Per AppLovin’s policy, your ad must contain the Privacy Information icon.
This icon links to an important privacy notice.
You can bind to it via -[MANativeAdViewBinderBuilder setOptionsContentViewTag:].
Your custom view containing the UI components to bind must subclass from MANativeAdView.
Ad placer supports manual native ad layouts. See the “Manual” section above to learn how to configure your ad units. See Configure ad rendering settings below to learn how to configure the ad placer to support your layout.
Create a MAAdPlacerSettings object with your ad unit identifier.
This object configures your ad placer and provides positioning information for ads in your feed.
Ad placer positions ads in your feed. It does this based on at least one of the following:
Configure ad positions by modifying MAAdPlacerSettings:
You can configure your ad placer by adjusting settings in MAAdPlacerSettings:
maximumAdCount
: Set this to the maximum number of ads in a stream (default=256).
If a stream contains multiple sections, this determines the maximum number of ads per ad section.
maximumPreloadedAdCount
: Set this to the maximum number of ads to preload for placement in a stream (default=4).
Choose one of these two options when you configure your ad placer:
UITableView, MATableViewAdPlacer.
If it is based on a UICollectionView, use MACollectionViewAdPlacer.
The helper class wraps the original adapter to automatically render and insert ads into the feed.MAAdPlacer in your implementation.To configure your ad placer with MATableViewAdPlacer follow these instructions:
MATableViewAdPlacer with your table view and settings:UITableView properties and methods with the AppLovin category equivalents (prefixed with al_):
dataSourcedelegatedeleteRowsAtIndexPaths:withRowAnimation:deleteSections:withRowAnimation:dequeueReusableCellWithIdentifier:forIndexPath:deselectRowAtIndexPath:animated:endUpdatesindexPathForCell:indexPathForRowAtPoint:indexPathForSelectedRowindexPathsForRowsInRect:indexPathsForSelectedRowsindexPathsForVisibleRowsinsertRowsAtIndexPaths:withRowAnimation:insertSections:withRowAnimation:moveRowsAtIndexPaths:withRowAnimation:moveSections:withRowAnimation:performBatchUpdates:completion:rectForRowAtIndexPath:reloadDataTo configure your ad placer with MACollectionViewAdPlacer follow these instructions:
MACollectionViewAdPlacer with your table view and settings:UITableView properties and methods with the AppLovin category equivalents (prefixed with al_):
cellForItemAtIndexPath:dataSourcedelegatedeleteItemsAtIndexPaths:deleteSections:dequeueReusableCellWithIdentifier:forIndexPath:deselectItemAtIndexPath:animated:indexPathForCell:indexPathForItemAtPoint:indexPathsForSelectedItemsindexPathsForVisibleItemsinsertItemsAtIndexPaths:insertSections:layoutAttributesForItemAtIndexPath:moveItemsAtIndexPaths:moveSections:performBatchUpdates:completion:reloadDatareloadItemsAtIndexPaths:reloadSections:scrollToItemAtIndexPath:atScrollPosition:animated:Set the nativeAdViewNib and nativeAdViewBinder properties on the ad placer before you load ads.
AppLovin recommends that you also set the adSize property.
This optimizes rendering.
All ad placers include optional delegate callbacks that can notify you events:
didLoadAdAtIndexPath:didRemoveAdsAtIndexPaths:didClickAd:didPayRevenueForAd:Native ads let you monetize your app in a way that’s consistent with its existing design. The AppLovin MAX SDK gives you access to an ad’s individual assets. This way, you can design the ad layout to be consistent with the look and feel of your app. The SDK automatically handles image caching and metrics tracking. You can focus on how, when, and where to display ads.
Use this API if you have custom views and you want to manually load native ad assets into those views. This integration method involves three high-level steps:
To use the manual API, select Manual in the Create New Ad Unit screen:

You can bind custom UI components to the MAX SDK and render native ad assets into those components. This example demonstrates this with custom views created using xibs and unique tag IDs. You can also use this method if you create your views programmatically or with the Storyboard.
Per AppLovin’s policy, your ad must contain the Privacy Information icon.
This icon links to an important privacy notice.
You can bind to it via -[MANativeAdViewBinderBuilder setOptionsContentViewTag:].
Your custom view containing the UI components to bind must subclass from MANativeAdView.

Assign unique tag IDs to the subviews of your custom views.
You use these IDs in the next integration step.
The example image below sets the ID to 1234 for the title label.

Next, bind the subviews using unique tag IDs with an instance of MANativeAdViewBinder.
AppLovin does not guarantee a network will return certain assets.
As of Google bidding and Google AdMob adapter version 9.11.0.6 and Google Ad Manager adapter version 9.11.0.5, take these steps to bind UI components. This ensures that any unassociated views in your custom native ad view are still clickable for those networks:
Add a wrapper view inside of MANativeAdView that contains all the ad assets.
Set its Custom Class to GADNativeAdView.

Give this wrapper view a unique Tag that is not used by other views.

Set a local extra parameter for the native ad loader that contains this tag value, with the corresponding key google_native_ad_view_tag.
For example, if the view’s tag is 1008:
To load a pre-rendered native ad, instantiate a MANativeAdLoader corresponding to your Ad Unit ID and call its loadAdIntoAdView method.
Implement and set the MANativeAdDelegate so that you are notified when your native ad’s load state changes.
To load a native ad, instantiate a MANativeAdLoader corresponding to your Ad Unit ID and call its loadAd method.
Implement and set the MANativeAdDelegate so that you are notified when your native ad’s load state changes.
Then use the MAAd returned in didLoadNativeAd:forAd: to render the ad view.
You can do this by calling MANativeAdLoader’s renderNativeAdView:withAd: method.
If you are no longer using a native ad, destroy its resources.
Do so by calling the destroy() method.
If you do not do this, the performance of your app degrades.
Below is an example of how you load and destroy a native ad, after you have bound the UI components from the previous step:
For AppLovin Exchange demand, the maximum numbers of characters allowed for Title, Description, and CTA are as follows:
| Asset | Maximum character count |
|---|---|
| Title | 50 characters |
| Description | 150 characters. You can add an ellipsis (…) after 149 characters, as the 150th character. |
| CTA | 15 characters |
For SDK-mediated networks, the network sets the maximum character counts.
The following code snippet shows how you get the media content aspect ratio of your native ad:
With the AppLovin MAX SDK you can access and render the star rating for the advertised app. The value, if available, is a floating point number in the range of [0.0, 5.0].
The MAX SDK automatically renders the stars in the container view that you designate as the star rating container. If the network does not provide the star rating, or the star rating is < 3, the SDK does not fill the star rating container view. You are responsible for adjusting your layout accordingly.
To retrieve the star rating for the current ad:
Ad Placer automatically inserts native ads into your existing content stream using UITableView or UICollectionView.
To integrate this API, take the following high-level steps:
reloadRowsAtIndexPaths:withRowAnimation:reloadSections:withRowAnimation:scrollToRowAtIndexPath:atScrollPosition:animated:selectRowAtIndexPath:animated:scrollPosition:visibleCellsloadAds to start loading ads.The following code shows how you load ads into a table view by using MATableViewAdPlacer:
selectedItemAtIndexPath:animated:scrollPosition:visibleCellsloadAds to start loading ads.The following code shows how you load ads into a table view by using MACollectionViewAdPlacer:
Follow each network’s guidance and bind their required ad assets. Otherwise they may invalidate your impressions.
You must replace uses of the UITableView/UICollectionView properties and methods in your code with AppLovin’s category equivalents.
These exist in UITableView+MATableViewAdPlacer.h or UICollectionView+MACollectionViewAdPlacer.h.
These methods adjust index paths to account for the inserted ads.
They also inform the ad placer of changes to the content.
AppLovin deprecated templates integration. If you integrate native ads into your app via templates, those ads will start no-filling at . AppLovin will remove support for templates integration in an upcoming SDK release.
Follow each network’s guidance and bind their required ad assets. Otherwise, they may invalidate your impressions.
Show native ads in the ad expiration window of four hours. Impressions associated with ads shown outside this window are invalidated.
Some networks do not provide media content aspect ratios, in which case the value is zero.