This guide is intended for publishers who want to use the Google Mobile Ads SDK to load and display ads from AppLovin Ads through waterfall mediation. It covers how to add AppLovin to an ad unit's mediation configuration and how to integrate the AppLovin SDK and adapter into an iOS app.
Supported integrations and ad formats
The Ad Manager mediation adapter for AppLovin has the following capabilities:
Integration | |
---|---|
Bidding | |
Waterfall | |
Formats | |
Banner | 1 |
Interstitial | |
Rewarded | |
Native |
Banner ads (excluding MREC banners) are supported only in mediation. Bidding does not support any type of banner ads.
Requirements
- iOS deployment target of 10.0 or higher
- Latest Google Mobile Ads SDK
Step 1: Set up AppLovin
Sign up or log in to your AppLovin account.
To set up your Ad Manager ad unit, you'll need your AppLovin SDK Key and Report Key. To find them, go to the AppLovin Dashboard and click on the Account tab. In the dropdown list under Account, select Keys to see both values.
Select app for mediation
On the AppLovin dashboard, select Applications under the Monetization section to get to your registered apps. Select the app you'd like to use with mediation from the list of available apps.
Create Zone
On the AppLovin dashboard, select Zones under the Monetization section to get to your registered Zone IDs. If you have already created the required Zones for your app, skip ahead to Step 2. To create a new Zone ID, click Create Zone.
For Pricing, select either Flat CPM with the drop-down to select specific countries for CPM zones or Optimized by AppLovin for non CPM Zones. Then, click Save.
Once the Zone is created, the Zone ID can be found under the Zone ID column.

Step 2: Configure mediation settings for your Ad Manager ad unit
Sign in to your Ad Manager account. Navigate to Delivery > Yield groups and click the New yield group button.
Enter a unique Name for your yield group, set the Status to Active, select your Ad Format, and set the Inventory type to Mobile App. Under the Targeting > Inventory section, select the Ad Unit ID to which you want to add mediation.
Next, click the Add yield partner button.
If you already have a Yield partner for AppLovin, you can simply select it. Otherwise, select Create a new yield partner.
Select AppLovin as the Ad network and enter a unique Name. Enable Mediation and turn on Automatic data collection, and enter the Report Key obtained in the previous section. You don't need to enter a Username and Password. Click Save when done.
Once the Yield partner is selected, choose Mobile SDK mediation as the Integration type, iOS as the Platform, and Active as the Status. Enter the Bundle ID of your app along with the Zone ID and the SDK Key obtained in the previous section and a Default CPM value.
Click Save at the bottom of the page when done.
Using rewarded ads
In the settings for your rewarded ad unit, provide values for the reward amount and reward type. Then, to ensure you provide the same reward to the user no matter which ad network is served, check the Override reward settings from third-party ad networks when using mediation box.
Step 3: Import the AppLovin SDK and adapter
Using CocoaPods (recommended)
Add the following line to your project's Podfile:
pod 'GoogleMobileAdsMediationAppLovin'
From the command line run:
pod install --repo-update
Manual integration
Download the latest version of the AppLovin iOS SDK and link
ApplovinSDK.framework
in your project.Download the latest version of the AppLovin adapter from the download link in the Changelog and link
ApplovinAdapter.framework
in your project.Add the following frameworks to your project:
AdSupport
AVFoundation
CoreGraphics
CoreMedia
CoreTelephony
StoreKit
SystemConfiguration
UIKit
WebKit (NEW)
libz.tbd (NEW)
Step 4: Additional code required
No additional code required for AppLovin integration.
Step 5: Test your implementation
AppLovin recommends that test ads should be used during development if you cannot get live ads.
To enable test ads, go to the Manage Apps page by clicking on your app's name in the AppLovin dashboard and navigate to the Test Mode section. Toggle the Test Mode switch to ON.
Test Mode may take up to 30 mins to take effect. It will also automatically reset to OFF after two hours.
Optional steps
EU consent and GDPR
Under the Google EU User Consent Policy, you must ensure that certain disclosures are given to, and consents obtained from, users in the European Economic Area (EEA) regarding the use of device identifiers and personal data. This policy reflects the requirements of the EU ePrivacy Directive and the General Data Protection Regulation (GDPR). When seeking consent, you must identify each ad network in your mediation chain that may collect, receive, or use personal data and provide information about each network's use. Google currently is unable to pass the user's consent choice to such networks automatically.
The section below shows you how to enable or disable personalized ads for AppLovin.
In SDK version
5.0.1, AppLovin added the setHasUserContent
and
setIsAgeRestrictedUser
methods. The following sample code shows how to pass
consent information to the AppLovin SDK. It is recommended that you call these
methods prior to requesting ads via the Google Mobile Ads SDK.
Swift
import AppLovinSDK
// ...
ALPrivacySettings.setHasUserConsent(true)
Objective-C
#import <AppLovinSDK/AppLovinSDK.h>
// ...
[ALPrivacySettings setHasUserConsent:YES];
Additionally, if the user is known to be in an age-restricted category, you can
set the following flag to YES
.
Swift
import AppLovinSDK
// ...
ALPrivacySettings.setIsAgeRestrictedUser(true)
Objective-C
#import <AppLovinSDK/AppLovinSDK.h>
// ...
[ALPrivacySettings setIsAgeRestrictedUser:YES];
See AppLovin's privacy settings for more details.
Add AppLovin Corp. to GDPR ad partners list
Follow the steps in GDPR settings to add AppLovin Corp. to the GDPR ad partners list in the Ad Manager UI.
CCPA
The California Consumer Privacy Act (CCPA) requires giving California state residents the right to opt out of the "sale" of their "personal information" (as the law defines those terms), with the opt-out offered via a prominent "Do Not Sell My Personal Information" link on the "selling" party's homepage. The CCPA preparation guide offers the ability to enable restricted data processing for Google ad serving, but Google is unable to apply this setting to each ad network in your mediation chain. Therefore, you must identify each ad network in your mediation chain that may participate in the sale of personal information and follow guidance from each of those networks to ensure compliance with CCPA.
Add AppLovin Corp. to CCPA ad partners list
Follow the steps in CCPA settings to add AppLovin Corp. to the CCPA ad partners list in the Ad Manager UI.
Network-specific parameters
The AppLovin adapter supports muteAudio
, an optional extra to disable audio on
video ads. This parameter can be passed to the adapter using the
GADMAdapterAppLovinExtras
class and must be set on every ad request.
Here's how to set it:
Swift
let request = GAMRequest()
let extras = GADMAdapterAppLovinExtras()
extras.muteAudio = false
request.register(extras)
Objective-C
GAMRequest *request = [GAMRequest request];
GADMAdapterAppLovinExtras * extras = [[GADMAdapterAppLovinExtras alloc] init];
extras.muteAudio = NO;
[request registerAdNetworkExtras:extras];
Optimizations
Initializing the AppLovin SDK as soon as your application launches provides AppLovin the ability to track events as soon as the app starts.
Swift
let sdk = ALSdk.shared(withKey: "sdkKey")
sdk?.initializeSdk()
Objective-C
ALSdk *sdk = [ALSdk sharedWithKey:@"sdkKey"];
[sdk initializeSdk];
Error codes
If the adapter fails to receive an ad from AppLovin,
publishers can check the underlying error from the ad response using
GADResponseInfo.adNetworkInfoArray
under the following classes:
GADMAdapterAppLovin
GADMAdapterAppLovinRewardBasedVideoAd
GADMediationAdapterAppLovin
Here are the codes and accompanying messages thrown by the AppLovin adapter when an ad fails to load:
Error code | Reason |
---|---|
-1009 to -1, 204 | AppLovin SDK returned an error. See Unity's code for more details. |
101 | The requested ad size does not match an AppLovin supported banner size. |
102 | AppLovin server parameters configured in the Ad Manager UI are missing/invalid. |
103 | Failed to show AppLovin ad. |
104 | Requested multiple ads for the same zone. AppLovin can only load 1 ad at a time per zone. |
105 | AppLovin SDK key not found. |
107 | Bid token is empty. |
108 | AppLovin Adapter does not support the ad format being requested. |
110 | AppLovin sent a successful load callback but loaded zero ads. |
AppLovin iOS Mediation Adapter Changelog
Version 11.4.2.0
- Verified compatibility with AppLovin SDK 11.4.2.
Built and tested with:
- Google Mobile Ads SDK version 9.5.0.
- AppLovin SDK version 11.4.2.
Version 11.4.1.0
- Verified compatibility with AppLovin SDK 11.4.1.
Built and tested with:
- Google Mobile Ads SDK version 9.5.0.
- AppLovin SDK version 11.4.1.
Version 11.4.0.0
- Verified compatibility with AppLovin SDK 11.4.0.
Built and tested with:
- Google Mobile Ads SDK version 9.5.0.
- AppLovin SDK version 11.4.0.
Version 11.3.3.0
- Verified compatibility with AppLovin SDK 11.3.3.
Built and tested with:
- Google Mobile Ads SDK version 9.3.0.
- AppLovin SDK version 11.3.3.
Version 11.3.2.0
- Verified compatibility with AppLovin SDK 11.3.2.
Built and tested with:
- Google Mobile Ads SDK version 9.2.0.
- AppLovin SDK version 11.3.2.
Version 11.3.1.0
- Verified compatibility with AppLovin SDK 11.3.1.
Built and tested with:
- Google Mobile Ads SDK version 9.1.0.
- AppLovin SDK version 11.3.1.
Version 11.3.0.0
- Verified compatibility with AppLovin SDK 11.3.0.
Built and tested with:
- Google Mobile Ads SDK version 9.1.0.
- AppLovin SDK version 11.3.0.
Version 11.2.1.0
- Verified compatibility with AppLovin SDK 11.2.1.
Built and tested with:
- Google Mobile Ads SDK version 9.1.0.
- AppLovin SDK version 11.2.1.
Version 11.2.0.0
- Verified compatibility with AppLovin SDK 11.2.0.
Built and tested with:
- Google Mobile Ads SDK version 9.1.0.
- AppLovin SDK version 11.2.0.
Version 11.1.2.0
- Verified compatibility with AppLovin SDK 11.1.2.
Built and tested with:
- Google Mobile Ads SDK version 9.0.0.
- AppLovin SDK version 11.1.2.
Version 11.1.1.0
- Verified compatibility with AppLovin SDK 11.1.1.
Built and tested with:
- Google Mobile Ads SDK version 9.0.0.
- AppLovin SDK version 11.1.1.
Version 11.1.0.0
- Verified compatibility with AppLovin SDK 11.1.0.
- Verified compatibility with Google Mobile Ads SDK version 9.0.0.
- Now requires Google Mobile Ads SDK version 9.0.0 or higher.
Built and tested with:
- Google Mobile Ads SDK version 9.0.0.
- AppLovin SDK version 11.1.0.
Version 11.0.0.0
- Verified compatibility with AppLovin SDK 11.0.0.
Built and tested with:
- Google Mobile Ads SDK version 8.13.0.
- AppLovin SDK version 11.0.0.
Version 10.3.7.0
- Verified compatibility with AppLovin SDK 10.3.7.
Built and tested with:
- Google Mobile Ads SDK version 8.12.0.
- AppLovin SDK version 10.3.7.
Version 10.3.6.0
- Verified compatibility with AppLovin SDK 10.3.6.
- Now requires minimum iOS version 10.0.
Built and tested with:
- Google Mobile Ads SDK version 8.11.0.
- AppLovin SDK version 10.3.6.
Version 10.3.5.0
- Verified compatibility with AppLovin SDK 10.3.5.
Built and tested with:
- Google Mobile Ads SDK version 8.9.0.
- AppLovin SDK version 10.3.5.
Version 10.3.4.0
- Verified compatibility with AppLovin SDK 10.3.4.
Built and tested with:
- Google Mobile Ads SDK version 8.8.0.
- AppLovin SDK version 10.3.4.
Version 10.3.3.0
- Verified compatibility with AppLovin SDK 10.3.3.
- The adapter will now attempt to initialize the AppLovin SDK before requesting ads.
Built and tested with:
- Google Mobile Ads SDK version 8.7.0.
- AppLovin SDK version 10.3.3.
Version 10.3.2.0
- Verified compatibility with AppLovin SDK 10.3.2.
Built and tested with:
- Google Mobile Ads SDK version 8.6.0.
- AppLovin SDK version 10.3.2.
Version 10.3.0.0
- Verified compatibility with AppLovin SDK 10.3.0.
Built and tested with:
- Google Mobile Ads SDK version 8.5.0.
- AppLovin SDK version 10.3.0.
Version 10.2.1.0
- Verified compatibility with AppLovin SDK 10.2.1.
- Relaxed dependency to Google Mobile Ads SDK version 8.0.0 or higher.
Built and tested with:
- Google Mobile Ads SDK version 8.4.0.
- AppLovin SDK version 10.2.1.
Version 10.2.0.0
- Verified compatibility with AppLovin SDK 10.2.0.
- Now requires Google Mobile Ads SDK version 8.4.0 or higher.
Built and tested with:
- Google Mobile Ads SDK version 8.4.0.
- AppLovin SDK version 10.2.0.
Version 10.1.1.0
- Verified compatibility with AppLovin SDK 10.1.1.
Built and tested with:
- Google Mobile Ads SDK version 8.3.0.
- AppLovin SDK version 10.1.1.
Version 10.1.0.0
- Verified compatibility with AppLovin SDK 10.1.0.
- Now requires Google Mobile Ads SDK version 8.3.0 or higher.
Built and tested with:
- Google Mobile Ads SDK version 8.3.0.
- AppLovin SDK version 10.1.0.
Version 10.0.1.0
- Verified compatibility with AppLovin SDK 10.0.1.
- Now requires Google Mobile Ads SDK version 8.2.0 or higher.
Built and tested with:
- Google Mobile Ads SDK version 8.2.0.
- AppLovin SDK version 10.0.1.
Version 10.0.0.0
- Verified compatibility with AppLovin SDK 10.0.0.
- Now requires Google Mobile Ads SDK version 8.1.0 or higher.
Built and tested with:
- Google Mobile Ads SDK version 8.1.0.
- AppLovin SDK version 10.0.0.
Version 6.15.2.0
- Verified compatibility with AppLovin SDK 6.15.2.
- Now requires Google Mobile Ads SDK version 8.0.0 or higher.
- Updated the adapter to use the
.xcframework
format.
Built and tested with:
- Google Mobile Ads SDK version 8.0.0.
- AppLovin SDK version 6.15.2.
Version 6.15.1.0
- Verified compatibility with AppLovin SDK 6.15.1.
Built and tested with:
- Google Mobile Ads SDK version 7.69.0.
- AppLovin SDK version 6.15.1.
Version 6.15.0.0
- Verified compatibility with AppLovin SDK 6.15.0.
Built and tested with:
- Google Mobile Ads SDK version 7.69.0.
- AppLovin SDK version 6.15.0.
Version 6.14.11.0
- Verified compatibility with AppLovin SDK 6.14.11.
Built and tested with:
- Google Mobile Ads SDK version 7.69.0.
- AppLovin SDK version 6.14.11.
Version 6.14.10.0
- Verified compatibility with AppLovin SDK 6.14.10.
- Now requires Google Mobile Ads SDK version 7.69.0 or higher.
- Added the
GADMediationAdapterAppLovin.SDKSettings
property. Publishers may now configure AppLovin SDK settings through this API.
Built and tested with:
- Google Mobile Ads SDK version 7.69.0.
- AppLovin SDK version 6.14.10.
Version 6.14.9.0
- Verified compatibility with AppLovin SDK 6.14.9.
Built and tested with:
- Google Mobile Ads SDK version 7.68.0.
- AppLovin SDK version 6.14.9.
Version 6.14.8.0
- Verified compatibility with AppLovin SDK 6.14.8.
Built and tested with:
- Google Mobile Ads SDK version 7.68.0.
- AppLovin SDK version 6.14.8.
Version 6.14.7.0
- Verified compatibility with AppLovin SDK 6.14.7.
- Now requires Google Mobile Ads SDK version 7.68.0 or higher.
Built and tested with:
- Google Mobile Ads SDK version 7.68.0.
- AppLovin SDK version 6.14.7.
Version 6.14.6.0
- Verified compatibility with AppLovin SDK 6.14.6.
- Now requires Google Mobile Ads SDK version 7.67.0 or higher.
Built and tested with:
- Google Mobile Ads SDK version 7.67.0.
- AppLovin SDK version 6.14.6.
Version 6.14.5.0
- Verified compatibility with AppLovin SDK 6.14.5.
Built and tested with:
- Google Mobile Ads SDK version 7.66.0.
- AppLovin SDK version 6.14.5.
Version 6.14.4.0
- Verified compatibility with AppLovin SDK 6.14.4.
- Now requires Google Mobile Ads SDK version 7.66.0 or higher.
Built and tested with:
- Google Mobile Ads SDK version 7.66.0.
- AppLovin SDK version 6.14.4.
Version 6.14.3.0
- Verified compatibility with AppLovin SDK 6.14.3.
Built and tested with:
- Google Mobile Ads SDK version 7.65.0.
- AppLovin SDK version 6.14.3.
Version 6.14.2.0
- Verified compatibility with AppLovin SDK 6.14.2.
Built and tested with:
- Google Mobile Ads SDK version 7.65.0.
- AppLovin SDK version 6.14.2.
Version 6.13.4.1
- Now requires Google Mobile Ads SDK version 7.65.0 or higher.
- Removed support for 300x250 medium rectangle ads and native ads.
Built and tested with:
- Google Mobile Ads SDK version 7.65.0.
- AppLovin SDK version 6.13.4.
Version 6.13.4.0
- Verified compatibility with AppLovin SDK 6.13.4.
Built and tested with:
- Google Mobile Ads SDK version 7.64.0.
- AppLovin SDK version 6.13.4.
Version 6.13.1.0
- Verified compatibility with AppLovin SDK 6.13.1.
- Now requires Google Mobile Ads SDK version 7.64.0 or higher.
- Removed 728x90 as a supported format for iPhone devices.
Built and tested with:
- Google Mobile Ads SDK version 7.64.0.
- AppLovin SDK version 6.13.1.
Version 6.13.0.0
- Verified compatibility with AppLovin SDK 6.13.0.
- Now requires Google Mobile Ads SDK version 7.61.0 or higher.
- Removed 728x90 as a supported format for iPhone devices.
Built and tested with:
- Google Mobile Ads SDK version 7.61.0.
- AppLovin SDK version 6.13.0.
Version 6.12.8.0
- Verified compatibility with AppLovin SDK 6.12.8.
Built and tested with:
- Google Mobile Ads SDK version 7.60.0.
- AppLovin SDK version 6.12.8.
Version 6.12.7.0
- Verified compatibility with AppLovin SDK 6.12.7.
- Now requires Google Mobile Ads SDK version 7.60.0 or higher.
Built and tested with:
- Google Mobile Ads SDK version 7.60.0.
- AppLovin SDK version 6.12.7.
Version 6.12.6.0
- Verified compatibility with AppLovin SDK 6.12.6.
Built and tested with:
- Google Mobile Ads SDK version 7.59.0.
- AppLovin SDK version 6.12.6.
Version 6.12.5.0
- Verified compatibility with AppLovin SDK 6.12.5.
- Updated the minimum required Google Mobile Ads SDK version to 7.59.0.
Built and tested with:
- Google Mobile Ads SDK version 7.59.0.
- AppLovin SDK version 6.12.5.
Version 6.12.4.0
- Verified compatibility with AppLovin SDK 6.12.4.
Built and tested with:
- Google Mobile Ads SDK version 7.58.0.
- AppLovin SDK version 6.12.4.
Version 6.12.3.0
- Verified compatibility with AppLovin SDK 6.12.3.
Built and tested with:
- Google Mobile Ads SDK version 7.58.0.
- AppLovin SDK version 6.12.3.
Version 6.12.2.0
- Verified compatibility with AppLovin SDK 6.12.2.
Built and tested with:
- Google Mobile Ads SDK version 7.58.0.
- AppLovin SDK version 6.12.2.
Version 6.12.1.0
- Verified compatibility with AppLovin SDK 6.12.1.
Built and tested with:
- Google Mobile Ads SDK version 7.58.0.
- AppLovin SDK version 6.12.1.
Version 6.12.0.0
- Verified compatibility with AppLovin SDK 6.12.0.
- Added standardized adapter error codes and messages.
Built and tested with:
- Google Mobile Ads SDK version 7.58.0.
- AppLovin SDK version 6.12.0.
Version 6.11.5.0
- Verified compatibility with AppLovin SDK 6.11.5.
- Removed support for the i386 architecture.
Built and tested with:
- Google Mobile Ads SDK version 7.56.0.
- AppLovin SDK version 6.11.5.
Version 6.11.4.0
- Verified compatibility with AppLovin SDK 6.11.4.
Built and tested with:
- Google Mobile Ads SDK version 7.55.1.
- AppLovin SDK version 6.11.4.
Version 6.11.3.0
- Verified compatibility with AppLovin SDK 6.11.3.
Built and tested with:
- Google Mobile Ads SDK version 7.55.0.
- AppLovin SDK version 6.11.3.
Version 6.11.1.0
- Verified compatibility with AppLovin SDK 6.11.1.
- Fixed an issue that caused native ads to fail to load.
Built and tested with:
- Google Mobile Ads SDK version 7.53.1.
- AppLovin SDK version 6.11.1.
Version 6.10.1.0
- Verified compatibility with AppLovin SDK 6.10.1.
Built and tested with:
- Google Mobile Ads SDK version 7.52.0.
- AppLovin SDK version 6.10.1.
Version 6.9.5.0
- Verified compatibility with AppLovin SDK 6.9.5.
Built and tested with:
- Google Mobile Ads SDK version 7.50.0.
- AppLovin SDK version 6.9.5.
Version 6.9.4.0
- Verified compatibility with AppLovin SDK 6.9.4.
- Fix RTB rewarded videos not being able to show even if loaded.
- Fix adapter disallowing future ad loads of a previously-loaded zone that has been timed out by AdMob or not shown by the publisher.
- Fix native ads not working when passing SDK key from server.
- Validate SDK key from server, then fallback to Info.plist if server’s SDK key is invalid (e.g. in case of placeholder values being sent down).
- Validate custom zone IDs from server (e.g. in case of placeholder values being sent down).
- Remove placements API.
Built and tested with:
- Google Mobile Ads SDK version 7.50.0.
- AppLovin SDK version 6.9.4.
Version 6.8.0.0
- Verified compatibility with AppLovin SDK 6.8.0.
- Removed support for Native App Install ad requests. Apps must use the Unified Native Ads API to request native ads.
- Now requires Google Mobile Ads SDK version 7.46.0 or higher.
Version 6.6.1.0
- Verified compatibility with AppLovin SDK 6.6.1.
- Fixed a crash caused by calling a completionHandler on a nil object.
- Updated the adapter to handle multiple interstitial requests.
- Added support for flexible banner ad sizes.
Version 6.3.0.0
- Verified compatibility with AppLovin SDK 6.3.0.
- Updated the adapter to use the new rewarded API.
- Now requires Google Mobile Ads SDK version 7.41.0 or higher.
Version 6.2.0.0
- Verified compatibility with AppLovin SDK 6.2.0.
Version 6.1.4.0
- Verified compatibility with AppLovin SDK 6.1.4.
Version 5.1.2.0
- Verified compatibility with AppLovin SDK 5.1.2.
Version 5.1.1.0
- Verified compatibility with AppLovin SDK 5.1.1.
Version 5.1.0.0
- Verified compatibility with AppLovin SDK 5.1.0.
Version 5.0.2.0
- Verified compatibility with AppLovin SDK 5.0.2.
Version 5.0.1.1
- Add support for native ads.
- Set AdMob as mediation provider on the AppLovin SDK.
Version 5.0.1.0
- Verified compatibility with Applovin SDK 5.0.1.
Version 4.8.4.0
- Verified compatibility with Applovin SDK 4.8.4.
Version 4.8.3.0
- Add support for zones and smart banners.
Version 4.7.0.0
- Verified compatibility with AppLovin SDK 4.7.0.
Version 4.6.1.0
- Verified compatibility with AppLovin SDK 4.6.1.
Version 4.6.0.0
- Verified compatibility with AppLovin SDK 4.6.0.
Version 4.5.1.0
- Verified compatibility with AppLovin SDK 4.5.1.
Version 4.4.1.1
- Added support for banner ads.
Version 4.4.1.0
- Verified compatibility with AppLovin SDK 4.4.1.
Version 4.3.1.0
- Added support for interstitial ads.
Earlier versions
- Added support for rewarded video ads.