VMAX
 
 
 
 
Show Sidebar

Requesting Native Ads – iOS SDK

Rất tiếc, mục này chỉ tồn tại ở 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.

Using Native Helper Libraries is a recommended method to request Native ads. We have also included an alternative method here.

Note: Native Helper Libraries are available for VMAX SDK version 3.5.1 and above

Native Helper Libraries

The VMAX Native Ad Helper Libraries have been designed to reduce the efforts of the developer in rendering the native ads. The libraries help in rendering native ads in any one of the four formats:

  1. In-feed
  2. Content Stream
  3. Tile
  4. Icon

Adding helper libraries to your project

  1. Extract the iOS SDK zip file to a suitable location.
  2. Locate the VMaxNativeAdHelper folder inside the extracted native iOS SDK directory.
  3. Based on your requirement, import the required helper library directory from among VMaxNativeAdTileHelperVMaxNativeContentStreamAdHelper,
    VMaxNativeIconAdHelperVMaxNativeInFeedAdHelper into your Xcode project. Each directory further contains the headers, static lib and resources bundle required to function.
  4. Select the appropriate Target membership via ‘Add to targets’ during import.

Refer the VMaxSample Xcode project located inside the iOS SDK zip to see the helper library usage in action. Alternatively, refer the guides below for step by step detail.

Using the In-feed Helper Library

  1. Import VMaxNativeInFeedAdHelper folder into your project
  2. Create instance of VMaxNativeInFeedAdView using nativeAd Object
Objective-CSwift

In-feed Delegates

Confirm to VMaxNativeInFeedAdViewDelegate for getting following callbacks:

Objective-CSwift

Integration of NativeAd using Content Stream Helper Library

  1. Import VMaxNativeContentStreamAdHelper folder into your project
  2. Create instance of VMaxNativeContentStreamAdView using nativeAd Object
Objective-CSwift

Content Stream Delegates

Confirm to VMaxNativeContentStreamAdViewDelegate for getting following callbacks:

Objective-CSwift

Integration of NativeAd using Tile Helper Library

  1. Import VMaxNativeTileAdHelper folder into your project
  2. Create instance of VMaxNativeTileAdView using nativeAd Object
Objective-CSwift

Tile Delegates

Confirm to VMaxNativeTileAdViewDelegate for getting following callbacks:

Objective-CSwift

Integration of NativeAd using Icon Helper Library

  1. Import VMaxNativeIconAdHelper folder into your project
  2. Create instance of VMaxNativeIconAdView using nativeAd Object
Objective-CSwift

Icon Delegates

Confirm to VMaxNativeIconAdViewDelegate for getting following callbacks:

Extension to Native Icon ads

In addition to using the icon as an element to invoke an ad, you can use other ad elements in VMAX. Currently, the following elements are supported for the icon ad format as part of image extension sub-feature:

  • imageIcon
  • imageMain
  • imageMedium
  • textTitle
  • textDesc2

You can choose between rendering the Icon ad by specifying the element desired from among:


This can be done as follows:
Objective-CSwift

Properties for text extension

You can set the following properties to make the text look native in your app.

Additional notes for Admob Native Express Ads:

  1. The Icon library does not support Admob Native Express Ads
  2. The Tile, Infeed & Content Stream libraries support Admob Native Express Ads with the following requirements:
    • Ad Size: The ad size is a must and should always be provided to receive Admob Native Express Ads
    • The required ad size for Tile is 300×300 (width x height)
    • The required ad size for Infeed is 320×80 (width x height)
    • The required ad size for Content Stream is 300×250 (width x height)
    • Set the ad size via the setAdSettings: api on the ad view for key ‘VMaxAdViewAdmob_NativeAdSize’
    • Example:
      Objective-CSwift
    • Ad size is also required if you plan to not use the native helper libs and use custom ad views instead. The sizes will then need to be within the recommended range as provided by Admob
    • Failure to set an ad size or setting incorrect ad sizes will result in the Admob Native Express Ads not being rendered

What would you like to do next?