AppLovin MAX Integration for FeedAd iOS

The FeedAd iOS SDK can be integrated into the AppLovin MAX mediation as a custom SDK. We provide example apps (Objc, Swift), as well as, the mediation adapter for installation via CocoaPods, which will be required for the integration.

The formats currently supported by the adapter are:

  • Interstitial
  • Medium Rectangle / MREC
  • Native Ad (Manual)

The Native Ad format requires some customizations by the publisher to work (see the section Customizing the Display of Native Ads below). For all other formats, the adapter should provide a drop-in solution.

The following guide walks you through the steps required to setup the AppLovin MAX integration.

Setup Instructions

1. Install the Adapter via CocoaPods

Add the following line to your Podfile:

pod "FeedAd-AppLovin"

Then run

pod install --repo-update

to let CocoaPods install the adapter.

2. Setup the AppLovin SDK in Your App

Follow the AppLovin guides for integrating the AppLovin SDK and getting started with the ad format you would like to integrate:

3. Configure the FeedAd Adapter

Once you're able to see AppLovin test ads in your app, follow the AppLovin guide for creating a custom SDK network in your AppLovin dashboard.

In step one "Add Custom SDK Network Settings":

Set the fields as following:

  • Custom Network Name: FeedAd
  • iOS Adapter Class Name: FAAppLovinMediationAdapter

In step two "Enable the Custom SDK Network":

You have to enable the FeedAd custom SDK network for each Ad Unit you want to have FeedAd ads run on.

While setting this up in the AppLovin dashboard, set the fields as following:

  • Placement ID: The placement ID you want to address within FeedAd
  • Custom Parameters: { "clientToken": "<your-feedad-client-token>" }
  • CPM Price: Set this to the CPM you want AppLovin to report for this integration

Placement ID?

You can choose placement IDs yourself. A placement ID should be named after the ad position inside your product. For example, if you want to display an ad inside a list of news articles, you could name it "ad-news-overview".
A placement ID may consist of lowercase a-z, 0-9, - and _. You do not have to manually create the placement IDs before using them. Just specify them within the code, and they will appear in the FeedAd admin panel after the first request. Learn more about Placement IDs and how they are grouped to play the same Creative

4. Testing the Integration

At the time of writing, AppLovin does not yet support custom SDK networks in the Test Mode section of the AppLovin dashboard.

This means, for testing you might need to set a high CPM price for FeedAd (and a matching bid floor price) on your ad units, to see the FeedAd mediation adapter win. Since the networks AppLovin and AppLovin Exchange are active for each Ad Unit and cannot be disabled in the AppLovin dashboard, you might (otherwise) see ads delivered from those networks.

Please also note, that:

  • in iOS simulator only AppLovin test ads seem to be delivered -- you will need to test on a real iOS device and with the AppLovin Test Mode disabled, to see requests for the FeedAd mediation adapter
  • changes in the AppLovin dashboard may make some time (e.g. half an hour) to be effective and
  • remember to whitelist your IPv4 and IPv6 addresses / prefixes for the FeedAd Test Mode in the FeedAd Admin Panel

Customizing the Display of Native Ads

FeedAd does not fully support the Native Ad format. The example projects (Objc, Swift) therefore demonstrate how to alter the layout of your Native Ad to have FeedAd ads display in full height and width in the views of your Native Ad placements.

Since it is not known beforehand, whether FeedAd will be delivered on an Ad Unit and the AppLovin SDK requires the Native Ad layout to be provided and bound before the actual ad request (via MANativeAdViewBinder and MANativeAdLoader.loadAdIntoAdView:), the layout needs to be updated after a FeedAd ad has been received and before it is displayed.

In the example projects (Objc, Swift), the class FAAppLovinManualNativeAdView implements a method layoutForFeedAd that provides an example approach for this. You may want to customize this as needed for your app.

Implementation Details

To get the approach outlined in the example projects to work in your own app, please note the following implementation details:

  • You will have to subclass MANativeAdView and have your subclass implement the protocol FAAppLovinManualNativeAdLayouter.
  • The protocol FAAppLovinManualNativeAdLayouter requires your subclass to implement a single method layoutForFeedAd. This is your entry point for customizing your Native Ad layout for the display of FeedAd ads.
  • Then use your subclass instead of MANativeAdView to initialize and bind your layout, before loading a Native Ad into your Native Ad view.
  • Whenever the FeedAd mediation adapter is called to deliver a FeedAd ad, the mediation adapter will check, if the Native Ad view implements the protocol FAAppLovinManualNativeAdLayouter and automatically call its method layoutForFeedAd, before the ad will be displayed.