Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/admob-plus/admob-plus/llms.txt

Use this file to discover all available pages before exploring further.

Install the AdMob Plus package and configure it for Android and iOS.

Prerequisites

React Native project initialized (0.60.0+)
AdMob account with app registered

Installation

1

Install the Package

Install using your package manager:
npm install @admob-plus/react-native
2

Link Native Dependencies

For React Native 0.60+, the package auto-links. Just install iOS dependencies:
cd ios && pod install && cd ..
For React Native < 0.60, manual linking is required. See React Native documentation.
3

Configure Android

Add your AdMob App ID to android/app/src/main/AndroidManifest.xml:
AndroidManifest.xml
<manifest>
  <application>
    <meta-data
      android:name="com.google.android.gms.ads.APPLICATION_ID"
      android:value="ca-app-pub-xxx~xxx" />
  </application>
</manifest>
Replace ca-app-pub-xxx~xxx with your actual Android AdMob App ID.
4

Configure iOS

Add your AdMob App ID to ios/[ProjectName]/Info.plist:
Info.plist
<key>GADApplicationIdentifier</key>
<string>ca-app-pub-xxx~xxx</string>
Replace ca-app-pub-xxx~xxx with your actual iOS AdMob App ID.
Then reinstall pods:
cd ios && pod install && cd ..

Platform-Specific Setup

Android Requirements

  • Minimum SDK: 21 (Android 5.0)
  • Google Play Services: Automatically included via Gradle
The package automatically adds the Google Mobile Ads SDK dependency.

iOS Requirements

  • iOS Version: 12.0+
  • CocoaPods: Required for dependency management
The package includes a .podspec that manages the Google Mobile Ads SDK.

App Tracking Transparency (iOS)

For iOS 14+, add the tracking usage description to Info.plist:
Info.plist
<key>NSUserTrackingUsageDescription</key>
<string>This app uses your data for personalized advertising.</string>
Request tracking authorization in your app:
import { AdMob } from '@admob-plus/react-native';

const { status } = await AdMob.requestTrackingAuthorization();

Verification

Run your app to verify the installation:
# iOS
npx react-native run-ios

# Android
npx react-native run-android

Troubleshooting

  1. Clean the build: cd android && ./gradlew clean && cd ..
  2. Ensure Google Play Services is available
  3. Check that the AdMob App ID is correctly set in AndroidManifest.xml
  1. Try reinstalling pods: cd ios && pod deintegrate && pod install && cd ..
  2. Clean build folder in Xcode: Product → Clean Build Folder
  3. Ensure the AdMob App ID is correctly set in Info.plist
  1. Clear Metro bundler cache: npx react-native start --reset-cache
  2. Reinstall node modules: rm -rf node_modules && npm install
  3. For iOS, reinstall pods: cd ios && pod install && cd ..

Next Steps

Usage Guide

Learn how to display ads in your React Native app