You are here: Developers > OpenX Mobile iOS SDK > Parameters

Request parameters

Last updated on October 5, 2017

The tables on this page list the methods and properties that the OpenX Mobile iOS SDK supports.

OXMSDKConfiguration

OXMAdView

OXMUserParameters variables

OXMUserParameters methods

OXMInterstitialDisplayProperties

OXMSDKConfiguration

Method Description

Default

defaultDomain

If set, controls the initial value of domain for all newly created OXMAdViews. Useful if the same domain is in use throughout your app.

nil

defaultAdUnitId

If set, controls the initial value of adUnitID for all newly created OXMAdViews. Useful if the same domain is in use throughout your app.

nil

defaultAutoRefreshDelay

Controls the initial value of autoRefreshDelay for all newly created OXMAdViews in seconds.

60

creativeFactoryTimeout

Controls how long in seconds each creativeThe media asset associated with an ad, such as an image or video file. has to load before it is considered a failure.

3

useInternalClickthroughBrowser

Controls whether to use OpenX's in-app browser or the Safari app for displaying ad click-through content.

true

returnToInterstitialAfterClickthrough

If false, the interstitialA full-screen ad displayed in content transitions. For example, a video ad that loads between levels of a mobile game. is automatically closed when the click-through is closed.

false

sendMRAIDSupportParams

If true, the SDK sends "af=3,5", indicating support for MRAIDMobile Rich Ad Interface Definitions, a type of API framework for interfacing between an ad creative and native mobile capabilities..

true

logLevel

Controls the verbosity of OpenXSDKCore's internal logger. Options are (from most to least noisy):

  • .info
  • .warn
  • .error
  • .none

For details on possible errors that can occur, see Logging.

.info

debugLogFileEnabled

If true, the output of OpenXSDKCore's internal logger is written to a text file. This can be helpful for debugging.

false

secureRequestsEnabled

If true, the SDK will use HTTPS instead of HTTP.

false

OXMAdView

Property

Type

Description

Required?

adUnitIdentifierType

AdUnitIdentifierType

Type of ad unitThe smallest inventory component that represents the space on a site where ads display..

Options include:

The default is AdUnitIdentifierTypeAuid.

Required

adUnitID

NSString

OpenX ad unit ID.

For example: "123456789"

Required only if adUnitIdentifierType is AdUnitIdentifierTypeAuid.

domain

NSString

Your app's OpenX delivery domain.

For example: "pub-d.openx.net"

Required if adUnitIdentifierType is AdUnitIdentifierTypeAuid.

vastURL

NSString

URL from which to load VAST.

For example: "http://pub-d.openx.net/v/1.0/av?auid=123456789"

Required if adUnitIdentifierType is AdUnitIdentifierTypeVast.

autoDetectLocation

BOOL

Determines whether the adView will attempt to get GPS coordinates from the OS.

Default is false.

OpenX passively collects GPS information for data enrichment if it has been requested by the app and authorized by the app user.

Recommended

delegate

OXMAdViewDelegate

Delegate for the adView. Typically a UIViewController.

Recommended

flexAdSize

NSString

Allows multiple ad sizes for an ad unit (flex ads) which allows for better monetization. See Flex ads.

Recommended if displaying interstitials

interstitialDisplayProperties

OXMInterstitialDisplayProperties

Data structure containing properties for displaying interstitials.

Recommended if displaying interstitials

userParameters

OXMUserParameters

Data structure containing properties for enriching requests with user data.

Recommended

autoDisplayOnLoad

BOOL

Determines whether the ad immediately displays upon loading or if one of the following must be called: show() or showAsInterstitialFromRoot().

Default is true.

Optional

autoRefreshDelay

NSTimeInterval

Amount of time in seconds between refreshes. This value will be overwritten with any values received from the server. Prevent an auto-refresh by using a value of 0 or less.

Default is 60.

Optional

autoRefreshMax

NSUInteger

Maximum number of times the adView should refresh. This value will be overwritten with any values received from the server. Using a value of 0 indicates there is no maximum.

Default is 0.

Optional

backgroundColor

UIColor

Background color of the OXMAdView. This color will be displayed until the ad loads.

Default is [UIColor clearColor].

Optional

connectionTimeoutInSeconds

NSTimeInterval

Maximum amount of time the adView has to complete an ad requestCommunication from a web browser or app to an ad server to display an ad..

Default is 3.

Optional

preRenderContent

BOOL

Determines whether to preload the video. If set to true, video ads will be preloaded. Note that the SDK will not preload video ads larger than 25 MiB.

Set to false if you want to stream interstitial video ads.

Default is true.

Optional

OXMUserParameters variables

Variable

Type

Description

Required?

appStoreMarketURL NSString

Store URL for the mobile application.

For example: "https://itunes.apple.com/us/app/your-app/id123456789"

Recommended

networkType

OXMNetworkType

Network connection type of the user (offline, wifi, or cell).

For example: OXMNetworkTypeWifi

Recommended if available

userAge

UInt16

Age of the user in years.

For example: 35

Recommended if available

userAnnualIncomeInUS

UInt32

Annual income of the user in US dollars.

For example: 55000

Recommended if available

userEthnicity

OXMEthnicity

Ethnicity of the user (African American, Asian, Hispanic, White, Other).

For example: OXMEthnicityAsian

Recommended if available

userGender

OXMGender

The gender of the user (Male, Female, Other, Unknown).

For example: OXMGenderFemale

Recommended if available

userID

NSString

ID of the user within the app.

For example: "24601"

Recommended if available

userMaritalStatus

OXMMaritalStatus

The marital status of the user (Single, Married, Divorced, Unknown).

For example: OXMMaritalStatusDivorced

Recommended if available

carrier NSString

Mobile carrier - Defined by the Mobile Country Code (MCC) and Mobile Network Code (MNC), using the format: <MCC>-<MNC>.

For example: "310-410"

Optional

city NSString

City of the user.

For example: "Pasadena"

Optional
coordinates CLLocationCoordinate2D

GPS location coordinates, in decimal form, of the user. If the SDK has access to the GPS service, it will use that value instead.

For example: CLLocationCoordinate2DMake(33.7, 44.0)

Optional
country NSString

Country of the user. Format must be ISO 3166-1 (two letter, upper case).

For example: "US"

Optional
DMA NSString

For US locations, indicates the user's Designated Market Area.

For example: "803"

Optional
IP NSString

The IP address of the carrier gateway. If this is not present, OpenX retrieves it from the request header.

For example: "192.168.0.1"

Optional

state

NSString

State location of the user.

For example: "CA"

Optional

zipCode

NSString

US ZIP or postal code for the user.

For example: "91362" or "91601-3414"

Optional

OXMUserParameters methods

Method

Description

addCustomParam:@"val1" withName:@"key1"

Add custom parameters. The name will be auto-prepended with c. to avoid collisions.

Example: addCustomParam:@"73" withName:@"temperature"

addParam:@"val1" withName:@"key1"

Add a new OpenX param by name and set the param's needed value.

If aad call parameter doesn't exist in this SDK, you can set it manually using this method.

Example: addParam:@"73" withName:@"temperature"

setCustomParams:@["key1":@"val1"]

Add a dictionary of name-value parameter pairs, where each param name will be prepended with ‘c.’ to avoid name collisions.

Example: setCustomParams:@["key1":@"val1"

OXMInterstitialDisplayProperties

Property

Type

Description

closeButtonText NSString

Text for the close button.

Default is an empty string.

closeButtonImage UIImage

Image to use for the close button.

Default is nil and no image is used.

closeDelay

NSTimeInterval

The number of seconds at which you want to display the close button. The default is five (5) seconds. For details, see Video interstitial integration.

closePosition OXMInterstitalClosePosition

Enum determining several pre-defined close positions, which can be one of the following values:

  • .custom
  • .topCenter
  • .topRight
  • .topLeft

Default is .topRight.

contentFrame CGRect Size of the content frame.
contentViewColor UIColor

Background color of the interstitial.

Default is [UIColor clearColor].

customClosePosition CGRect

CGRect specifying where the close button should go.

Overrides closePosition if it is set.

Feedback form