You can download and integrate the MAX mediation adapters into your app in two ways:
Gradle
AppLovin recommends that you integrate adapters this way.
AppLovin’s adapters’ POM files automatically integrate the mediated network’s SDK and its dependencies.
Open Source Adapters
If you require more flexibility in the integration, you can integrate AppLovin’s open source adapters.
You are responsible for integrating the mediated SDKs and their dependencies.
You can find these adapters in the AppLovn-MAX-SDK-Android GitHub repository.
Gradle
Choose which mediated ad networks you want to integrate by checking the boxes below.
When you check those boxes, this page displays instructions specific to those networks.
Integrate AndroidX libraries into your project.
Refer to the Migrate to AndroidX guide for more information on how to migrate your project.
Add Your Google Bidding and Google AdMob / Google Ad Manager App ID
In your app’s AndroidManifest.xml, add a <meta-data> tag inside the <application> tag.
The example below shows you the correct attributes of this tag.
Replace «your-admob-app-id» with your Google bidding and Google AdMob / Google Ad Manager App ID.
Gradle Errors
Google AdMob requires Android Gradle plugin version 4.2.0 or higher and Gradle version 6.7.1 or higher.
If you see the following error, update your Android Gradle plugin and Gradle versions:
compileSdkVersion
Google Mobile Ads SDK versions 23.1.0 and newer require a minimum compileSdkVersion of 34.
Set the compileSdkVersion to 34 or higher in your app’s build.gradle.
The Amazon Publisher Services SDK requires that you initialize it outside of MAX SDK:
Load a Banner or MREC Ad from Amazon’s SDK
To integrate Amazon ads into MAX, you must load the Amazon ad first.
Before you load the MAX ad, pass the DTBAdResponse or AdError into the instance of MaxAdView.
You can do this by calling MaxAdView#setLocalExtraParameter().
To integrate Amazon interstitial ads into MAX, you must load the Amazon ad first.
Before you load the MAX ad, pass the DTBAdResponse or AdError into the instance of MaxInterstitialAd.
You can do this by calling MaxInterstitialAd#setLocalExtraParameter().
To integrate Amazon video interstitial ads into MAX, you must load the Amazon ad first.
Before you load the MAX ad, pass the DTBAdResponse or AdError into the instance of MaxInterstitialAd.
You can do this by calling MaxInterstitialAd#setLocalExtraParameter().
To integrate Amazon rewarded videos into MAX, first load the Amazon ad.
Before you load the MAX ad, pass the DTBAdResponse or AdError into the instance of MaxRewardedAd.
You can do this by calling MaxRewardedAd#setLocalExtraParameter().
AppLovin recommends that you enable test mode for Amazon’s SDK.
This allows you to receive test ads.
Enable test mode by making the following calls:
You can filter your waterfalls to contain only Amazon ads.
To do this, navigate to Select Live Network in the Mediation Debugger and select the Amazon network.
Meta Audience Network Data Processing Options
If you do not want to enable Limited Data Use (LDU) mode, pass SetDataProcessingOptions() an empty string array:
Several network SDKs use the <queries> element in their bundled Android Manifest files.
If you use an incompatible version of the Android Gradle plugin, this causes one of the following build errors:
To fix this error, upgrade to one of the following versions of the Android Gradle plugin.
These versions support the <queries> element:
Current Android Gradle Plugin Version
Version that Supports <queries> Element
4.1.*
All
4.0.*
4.0.1+
3.6.*
3.6.4+
3.5.*
3.5.4+
3.4.*
3.4.3+
3.3.*
3.3.3+
Adapter Network Information
iOS
You can download and integrate the MAX mediation adapters into your app in two ways:
CocoaPods
AppLovin recommends that you integrate adapters this way.
AppLovin’s adapters’ pods automatically integrate the mediated network’s SDK and its dependencies.
Open Source Adapters
If you require more flexibility in the integration, you can integrate AppLovin’s open source adapters.
You are responsible for integrating the mediated SDKs and any dependencies they require.
You can find these adapters in the AppLovin-MAX-SDK-iOS GitHub repository.
CocoaPods
Choose which mediated ad networks you want to integrate by checking the boxes below.
Then this page displays instructions specific to those networks.
This page also customizes a CocoaPods script for you.
Copy the customized CocoaPods script below to your Podfile.
Swift Build Settings
To support Swift for iOS versions below 12.2:
In the main target of your Xcode project select File > Build Settings.
Set Always Embed Swift Standard Libraries to Yes.
App Delegate window Property
Do not remove the window property of your App Delegate file.
If you do so, InMobi’s SDK may crash.
Audience Network SDK 6.2.1 was released on January 11, 2021.
This version has these important requirements:
Implement the setAdvertiserTrackingEnabled flag, irrespective of the use of mediation.
This informs Meta whether it can use the data to deliver personalized ads.
Add the SKAdNetwork IDs that Meta suggests to the Xcode project’s Info.plist so that advertisers can measure the success of ad campaigns.
Refer to the SKAdNetwork documentation for integration instructions.
Add Your Google Bidding and Google AdMob / Google Ad Manager App ID
In your app’s Info.plist, add a GADApplicationIdentifier key.
Give this key the String value of your Google bidding and Google AdMob / Google Ad Manager App ID.
Initialize the Amazon SDK
The Amazon Publisher Services SDK requires that you initialize it outside of MAX SDK:
Load a Banner or MREC Ad from Amazon’s SDK
To integrate Amazon ads into MAX, you must load the Amazon ad first.
Before you load the MAX ad, pass the DTBAdResponse or DTBAdErrorInfo into the instance of MAAdView.
You can do this by calling -[MAAdView setLocalExtraParameterForKey:value:].
To integrate Amazon interstitial ads into MAX, you must load the Amazon ad first.
Before you load the MAX ad, pass the DTBAdResponse or DTBAdErrorInfo into the instance of MAInterstitialAd.
You can do this by calling -[MAInterstitialAd setLocalExtraParameterForKey:value:].
To integrate Amazon interstitial ads into MAX, you must load the Amazon ad first.
Before you load the MAX ad, pass the DTBAdResponse or DTBAdErrorInfo into the instance of MAInterstitialAd.
You can do this by calling -[MAInterstitialAd setLocalExtraParameterForKey:value:]
To integrate Amazon rewarded videos into MAX, you must load the Amazon ad first.
Before you load the MAX ad, pass the DTBAdResponse or DTBAdErrorInfo into the instance of MARewardedAd.
You can do this by calling -[MARewardedAd setLocalExtraParameterForKey:value:].
You can filter your waterfalls to contain only Amazon ads.
To do this, navigate to Select Live Network in the Mediation Debugger and select the Amazon network.
Disable App Transport Security
To disable App Transport Security (ATS), add NSAppTransportSecurity to your app’s Info.plist.
Then add the key NSAllowsArbitraryLoads and set its Boolean value to YES.
Make sure this is the only key present.