Install the AdMob Adapter SDK
Install the RevenueCat AdMob adapter for iOS, Android, Flutter, React Native, or Unity
This tutorial shows you how to install the RevenueCat AdMob adapter for iOS, Android, Flutter, React Native, or Unity. By the end, your app will be ready to track AdMob events automatically with the adapter that matches its platform and Google Mobile Ads SDK.
This feature is currently in beta.
On Android, install either the legacy adapter or the Next-Gen adapter. Choose the adapter that matches the Google Mobile Ads SDK your app uses. The two adapters are mutually exclusive.
On Flutter, React Native and Unity, the adapter is a separate package installed next to the core RevenueCat SDK and the AdMob library for that platform, in the same way as the RevenueCat UI packages.
Prerequisites
Enable Impression-level ad revenue in your AdMob account before integrating the adapter. Follow Google's guide to turn on impression-level ad revenue.
- iOS
- Android (Legacy AdMob)
- Android (Next-Gen AdMob)
- Flutter
- React Native
- Unity
- Minimum iOS version: iOS 15.0+
- RevenueCat SDK:
purchases-ios5.89.0+ - AdMob SDK: Google Mobile Ads SDK 12.0.0+
- Swift only: This adapter does not expose Objective-C entrypoints. Use RevenueCat's base
AdTrackerAPIs directly for Objective-C integrations.
- RevenueCat SDK:
purchases-android10.19.0+ - AdMob SDK: Google Mobile Ads SDK 22.0.0+
- Minimum Android version: API level 24+
- Compile SDK: 35+
- Kotlin: 1.9+
- RevenueCat SDK:
purchases-android10.23.0+ - AdMob SDK: Google Mobile Ads Next-Gen SDK 1.3.0+
- Kotlin only: The adapter helpers aren't available from Java. Java apps can use the base
AdTrackerAPIs directly.
- Minimum iOS version: iOS 15.0+ (ad tracking is unavailable below that; calls are ignored with a warning)
- RevenueCat SDK:
purchases_flutter10.18.0+ - AdMob SDK:
google_mobile_ads8.x (9.x isn't supported yet) - Dart / Flutter: Dart 3.10+ and Flutter 3.38.1+
- Minimum iOS version: iOS 15.0+ (ad tracking is unavailable below that; calls are ignored with a warning)
- RevenueCat SDK:
react-native-purchases10.15.0, the same version as the adapter - AdMob SDK:
react-native-google-mobile-ads17.x (17.0.0 needs React Native 0.76+, 17.1.0+ needs 0.86+) and the New Architecture
- Minimum iOS version: iOS 15.0+ (ad tracking is unavailable below that; calls are ignored with a warning)
- RevenueCat SDK:
com.revenuecat.purchases-unity9.15.0+ - AdMob SDK: Google Mobile Ads Unity plugin (
com.google.ads.mobile) 10.x or newer
1. Install the adapter
- iOS
- Android (Legacy AdMob)
- Android (Next-Gen AdMob)
- Flutter
- React Native
- Unity
Add the AdMob adapter package via Swift Package Manager:
.package(url: "https://github.com/RevenueCat/purchases-ios-admob", from: "5.89.0")
Then add the RevenueCatAdMob product to your target.
If your project depends on RevenueCat via SPM, use the purchases-ios-spm package (not purchases-ios). The adapter declares this dependency correctly, but if you add RevenueCat separately, make sure both resolve from the same purchases-ios-spm repository to avoid duplicate package errors.
Add the AdMob adapter module to your app's build.gradle:
dependencies {
implementation 'com.revenuecat.purchases:purchases-admob:10.19.0+'
}
This module depends on the RevenueCat Purchases SDK and Google Mobile Ads SDK.
Remove purchases-admob and com.google.android.gms:play-services-ads before installing the Next-Gen adapter. The legacy and Next-Gen adapters can't coexist in the same app.
Add RevenueCat, the Next-Gen adapter, and Google Mobile Ads Next-Gen to your app module's build.gradle.kts:
val revenueCatVersion = "10.23.0"
dependencies {
implementation("com.revenuecat.purchases:purchases:$revenueCatVersion")
implementation("com.revenuecat.purchases:purchases-admob-next-gen:$revenueCatVersion")
implementation("com.google.android.libraries.ads.mobile.sdk:ads-mobile-sdk:1.4.0")
}
The adapter doesn't select a Google Mobile Ads Next-Gen version transitively. Your app owns this dependency, and the explicit version keeps builds reproducible.
Mediation adapters can bring legacy Google Mobile Ads artifacts back into the dependency graph. Exclude both legacy artifacts globally in build.gradle.kts to prevent duplicate-symbol build failures:
configurations.configureEach {
exclude(group = "com.google.android.gms", module = "play-services-ads")
exclude(group = "com.google.android.gms", module = "play-services-ads-lite")
}
Follow Google's Next-Gen migration guide for additional mediation-specific requirements.
Add purchases_flutter, google_mobile_ads, and purchases_admob_flutter as dependencies in your pubspec.yaml:
dependencies:
purchases_flutter: ^10.18.0
purchases_admob_flutter: ^10.18.0
google_mobile_ads: ^8.0.0
The adapter version follows the purchases_flutter version. Keep the explicit google_mobile_ads: ^8.0.0 constraint: flutter pub add google_mobile_ads picks the latest 9.x release, which the adapter doesn't support yet and fails to resolve against. Set your AdMob app IDs as described in the google_mobile_ads quick start. Configure Purchases and initialize MobileAds as you normally would; the adapter only tracks while Purchases is configured.
Add react-native-purchases, react-native-google-mobile-ads, and react-native-purchases-admob to your project:
npm install react-native-purchases react-native-google-mobile-ads react-native-purchases-admob
# or
yarn add react-native-purchases react-native-google-mobile-ads react-native-purchases-admob
The adapter version must match the react-native-purchases version exactly (it is an exact peer dependency). Configure Purchases and initialize mobileAds() as you normally would; the adapter only tracks while Purchases is configured.
Install the core RevenueCat Unity SDK (if not already installed) following the Unity installation guide, and the Google Mobile Ads Unity plugin (com.google.ads.mobile 10.x or newer, from OpenUPM or the .unitypackage) following Google's quick start.
Then add the adapter package com.revenuecat.purchases-admob-unity via Unity Package Manager (UPM) from the OpenUPM registry:
-
Add the OpenUPM scoped registry (if not already added). Go to your project's settings → Package Manager, and add a new scoped registry with URL
https://package.openupm.comand scopes:com.openupmandcom.revenuecat.purchases-admob-unity. -
Go to the Package Manager and from "My Registries", select the RevenueCat AdMob adapter package and click Install.
If you prefer, you can also use OpenUPM-CLI to add the package through the command line. Install the OpenUPM-CLI if you haven't already, then run openupm add com.revenuecat.purchases-admob-unity.
The adapter version follows the com.revenuecat.purchases-unity version. Its assembly definition references the Google Mobile Ads plugin's GoogleMobileAds DLLs, so it compiles whether the plugin was installed from OpenUPM or from the .unitypackage.
Next steps
Once the adapter is installed, follow the integration guide: