VMAX
 
 
 
 
Show Sidebar

Requesting Banner Ads – iOS SDK

Sorry, this entry is only available in English. For the sake of viewer convenience, the content is shown below in the alternative language. You may click the link to switch the active language.

For Banner Ads, please ensure that you have turned off the refresh from the mediation partner’s web interface when using a fresh integration of VMAX SDK 3.4.0 or higher. This change in settings is not required when updating from an earlier version to 3.4.0 or higher.

To request a banner

Create an instance of the VMaxAdView for Banner Ads and conform to the delegate.

Creating the Ad View

Objective CSwift

Set the frame of the AdView

Set the Frame for VMaxAdView prior to calling any methods of VMaxAdSDK in order to display ads properly. For a typical 320×50 ad placed at the bottom of the view, the code is as follows:

Objective CSwift

[Optional] Setting Custom Refresh Rate

Set an Ad Refresh rate greater than the default of 30 seconds.
Note 1: The minimum Ad Refresh rate is 30 seconds; setting a lower value will default to 30 seconds.
Note 2: Refresh rate is valid for Banner Ads only; Billboard Ads are not supported

Objective CSwift

[Optional] Setting the User Details

Set the User details for appropriate ad delivery.

Objective C

Setting the Request Timeout

Set the Request Timeout of Ads greater than the default Timeout of 20 seconds.
Note: The minimum Request Timeout is 20 seconds; setting a lower value will default to 20 seconds.

Objective CSwift

Requesting Ads with Orientation

To Request an Ad with Orientation use the loadAdWithOrientation method from the Required_Orientation_From_EnumVMaxAdOrientation.

Possible Orientation Values

Objective CSwift

 

Manual Caching

To have greater control over Ad Display, use the Manual Caching and displaying. This method disables Auto refresh property. To cache an Ad with Orientation use the cacheAdWithOrientation method from Required__Orientation_From_Enum VMaxAdOrientation.

Objective C

Knowing Ad States

Possible Ad State Values

Customizable Ad Properties

Possible Values

Objective C

Note: Config is a dictionary with following Keys

AdView APIs

To request Billboard Ads

To request billboard ads, create a new adView instance and set it’s UX Type to kVMaxAdUX_Interstitial.
For example,

Objective CSwift

To request and customize billboard ads, follow the procedure for banner ads. Replace kVMaxAdUX_Banner with kVMaxAdUX_Interstitial when using Objective-C and replace VMaxAdUX.Banner with VMaxAdUX.Interstitial when using Swift.

Ad View Delegate Syntax

Objective CSwift

What would you like to do next?