Show Sidebar

Integrating Native Ads Using Predefined Layouts – VMAX SDK for iOS

Integrating Native Ads through Native Predefined layouts is a recommended method to request Native ads. We have also included an alternative method which helps you build a custom layout according to your app’s components which you can find here.

Native Predefined Ad Layouts

    1. ContentStream (300 x 250)
    2. Infeed (320 x 50)
    3. Icon (80 x 80)

Fetch native ad

Create a native ad view & conform to the ad view delegate as follows:

Objective CSwift

You can set <VMaxAdUX> to render the desired native ad formats :

  1. ContentStream    : kVMaxAdUX_Native_ContentStream
  2. Infeed                 :  kVMaxAdUX_Native_Infeed
  3. Icon                    :  kVMaxAdUX_Native_Icon
  4. Custom               :  kVMaxAdUX_Native

Request Native ad using cache + show API

Objective CSwift


On caching success, onAdReady delegate is triggered after which developer is expected to call showAd.

Objective CSwift

Request Native ad using managed show API

Objective CSwift

Q: Do I need to manage refresh?
A: No, Vmax Sdk will automatically handle refreshing of Ads.

Q: Can I customize the refresh rate for native ads?
A: The default refresh rate for native ads is set at 30 seconds to ensure a good ad yield without compromising on the user experience. You can manage the the frequency at which the native Ads are refreshed using the setRefreshRate property. Use the following code to set a custom refresh rate:

Objective CSwift

What would you like to do next?