Show Sidebar

Requesting Native 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.

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

FAQs
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?