AdColonyOptions Class Reference

Inherits from NSObject
Declared in AdColonyOptions.h

Overview

AdColonyOptions is a superclass for all types of AdColonyOptions. Note that AdColonyOptions classes should never be instantiated directly. Instead, create one of the subclasses and set options on it using its properties as well as the string-based constants defined in its header file.

Properties

  userMetadata

Represents an AdColonyUserMetadata object.

@property (nonatomic, strong, nullable) AdColonyUserMetadata *userMetadata

Discussion

Configure and set this property to improve ad targeting.

Declared In

AdColonyOptions.h

Setting Options

– setOption:withStringValue:

Sets a supported option.

- (BOOL)setOption:(NSString *)option withStringValue:(NSString *)value

Parameters

option

An NSString representing the option.

value

An NSString used to configure the option.

Return Value

A BOOL indicating whether or not the option was set successfully.

Discussion

Use this method to set a string-based option with an arbitrary, string-based value.

Declared In

AdColonyOptions.h

– setOption:withNumericValue:

Sets a supported option.

- (BOOL)setOption:(NSString *)option withNumericValue:(NSNumber *)value

Parameters

option

An NSString representing the option. Strings must be 128 characters or less.

value

An NSNumber used to configure the option.

Return Value

A BOOL indicating whether or not the option was set successfully.

Discussion

Use this method to set a string-based option with an arbitrary, numerial value.

Declared In

AdColonyOptions.h

Option Retrieval

– getStringOptionWithKey:

Returns the string-based option associated with the given key.

- (nullable NSString *)getStringOptionWithKey:(NSString *)key

Parameters

key

A string-based option key.

Return Value

The string-based value associated with the given key. Returns nil if the option has not been set.

Discussion

Call this method to obtain the string-based value associated with the given string-based key.

Declared In

AdColonyOptions.h

– getNumericOptionWithKey:

Returns the numerical option associated with the given key.

- (nullable NSNumber *)getNumericOptionWithKey:(NSString *)key

Parameters

key

A string-based option key.

Return Value

The option value associated with the given key. Returns nil if the option has not been set.

Discussion

Call this method to obtain the numerical value associated with the given string-based key.

Declared In

AdColonyOptions.h