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 :
UILabelMain Text :
UILabelCall-To-Action :
UIButtonIcon Image :
UIImageViewMain Image :
UIImageViewPrivacy Icon :
UIImageViewAd Tag :
UIView (UILabel or UIImageView)
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
Configure the RenderingViewClass using the
setRenderingViewClass:renderingViewClass:method ofADXNativeAdFactory.Register the
ADXNativeAdFactoryDelegatecallbacks.Call loadAd on the
ADXNativeAdFactoryDelegateto load the ad.Once the ad is loaded successfully, the
onSuccess:nativeAd:callback ofADXNativeAdFactoryDelegatewill be invoked.
Case 2: Using AdPlacer with UITableView / UICollectionView
Configure the RenderingViewClass using the
setRenderingViewClass:renderingViewClass:method ofADXNativeAdFactory.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.
Use
ADXAdPositioningto specify fixed and repeating ad positions:addFixedIndexPath:– specify fixed ad positionsenableRepeatingPositionsWithInterval:– specify repeating ad positions
Call
loadAdsForAdUnitID:to load the ads.
4. Ad Revenue (paidEventHandler)
You can check the estimated ad revenue for ad impressions.
Last updated
Was this helpful?