Native Ad

1. Basic requirements

  • Add ​ADX iOS SDK to your project.

  • Use the Ad Unit ID issued for Native Ads.

  • Before requesting an ad, SDK initialization must be done first.

    • SDK initialization should be called only once when the app launches and ad requests should be made after SDK initialization is complete.

    • For iOS 14 and later, request ads only after obtaining ATT (App Tracking Transparency) permission.

2. Layout setup

For Native Ads, you must create the layout for the ad yourself. The required elements are as follows:

  • Title : UILabel

  • Main Text : UILabel

  • Call-To-Action : UIButton

  • Icon Image : UIImageView

  • Main Image : UIImageView

  • Privacy Icon : UIImageView

  • Ad Tag : UIView (UILabel or UIImageView)

The Ad Tag element must include a UI component that displays the text “Ad” or “Advertisement” to clearly indicate to users that it is an advertisement. Failure to include this element may result in ad delivery being suspended by some ad networks.

All of these elements must be included and properly configured, and no view should cover the ad content. Additionally, ensure that ad content is not modified or tampered with in any way, such as changing text, replacing images, or altering actions triggered by user interactions.

3. Implementation

Native Ads can be loaded using one of the following two methods:

Case 1: When using a single View

  1. Configure the RenderingViewClass using the setRenderingViewClass:renderingViewClass: method of ADXNativeAdFactory.

  2. Register the ADXNativeAdFactoryDelegate callbacks.

  3. Call loadAd on the ADXNativeAdFactoryDelegate to load the ad.

  4. Once the ad is loaded successfully, the onSuccess:nativeAd: callback of ADXNativeAdFactoryDelegate will be invoked.

Case 2: Using AdPlacer with UITableView / UICollectionView

  1. Configure the RenderingViewClass using the setRenderingViewClass:renderingViewClass: method of ADXNativeAdFactory.

  2. Set the size of the ad to be loaded.

    • The ad size should be specified either in the XIB file or by setting the frame programmatically.

  3. Use ADXAdPositioning to specify fixed and repeating ad positions:

    • addFixedIndexPath: – specify fixed ad positions

    • enableRepeatingPositionsWithInterval: – specify repeating ad positions

  4. Call loadAdsForAdUnitID: to load the ads.

Since cell positions may change, please refer to ADXTableViewAdPlacer.h for UITableView or ADXCollectionViewAdPlacer.h for UICollectionView, and use the provided methods accordingly.

4. Ad Revenue (paidEventHandler)

You can check the estimated ad revenue for ad impressions.

  • As shown in the example below, use paidEventHandler to check the estimated eCPM value.

  • Manually set values during mediation setup and actual values may be mixed, so it is recommended to treat this as an estimate.

  • The currency unit of eCPM is USD.

  • You can link ad revenue data with your MMP. For details, please refer to the SDK integration guides below:

Last updated

Was this helpful?