Prerequisites
Capacitor project initialized
AdMob account with app registered
Installation
Configure Android
Add your AdMob App ID to
android/app/src/main/AndroidManifest.xml:AndroidManifest.xml
Replace
ca-app-pub-xxx~xxx with your actual Android AdMob App ID.Platform-Specific Setup
Android Requirements
- Minimum SDK: 21 (Android 5.0)
- Target SDK: 33+
- Google Play Services: Automatically included
iOS Requirements
- iOS Version: 12.0+
- CocoaPods: Automatically managed by Capacitor
App Tracking Transparency (iOS)
For iOS 14+, add the tracking usage description toInfo.plist:
Info.plist
Verification
Verify the installation by checking the installed Capacitor plugins:@admob-plus/capacitor in the list.
Troubleshooting
Build fails on Android
Build fails on Android
- Ensure your
build.gradleuses the correct Google Play Services version - Run
npx cap sync androidto refresh dependencies - Clean and rebuild:
cd android && ./gradlew clean && cd ..
Build fails on iOS
Build fails on iOS
- Update CocoaPods:
cd ios/App && pod install && cd ../.. - If still failing, try:
cd ios/App && pod deintegrate && pod install && cd ../.. - Run
npx cap sync ios
Plugin not found at runtime
Plugin not found at runtime
Ensure you’ve run
npx cap sync after installing the package.Next Steps
Usage Guide
Learn how to display ads in your Capacitor app