Repository navigation
v8.2.0
Highlights
v8.2.0 adds rewarded-ad click notifications, allows iOS consent forms before Mobile Ads SDK initialization, and fixes Android banner layout, initialization, and AGP 9 build issues. It also corrects iOS revenue reporting and preserves native ad-load error codes. Review the migration notes below when upgrading from v8.1.0, especially if you handle initialization failures, revenue, or ad-load errors.
Upgrade
Use Capacitor 8.5 or later within v8. Update @capacitor/core, @capacitor/cli, and the native platform packages you use together, following the Capacitor 8.5 migration guide. Older Android Capacitor versions can consume window insets before they reach the banner.
npm install @capacitor-community/admob@8.2.0
npx cap syncRebuild your native app; this release includes native changes. The supported platforms remain iOS 15+ and Android API 24+. Google Mobile Ads SDK versions remain Android 25.4.x and iOS 13.6.0. This release does not migrate to Android's Next-Gen SDK or remove CocoaPods support.
New API: rewarded-ad click events
Register the new RewardAdPluginEvents.adClicked listener on Android or iOS before showing a rewarded ad:
import { AdMob, RewardAdPluginEvents } from '@capacitor-community/admob';
const clickListener = await AdMob.addListener(RewardAdPluginEvents.adClicked, () => {
console.log('Rewarded ad clicked');
});
// Remove the listener when its owning screen is destroyed.
// await clickListener.remove();The event string is onRewardedVideoAdClicked. It forwards SDK click callbacks, including those received after a reward is earned while the ad remains displayed. It has no payload and applies to rewarded ads, not rewarded interstitials. A click is not an earned reward: continue granting rewards once, from the Rewarded event or the show result. The demo's REWARD validation screen includes a manual test-ad click check. (#481)
Migration and behavior changes
Gather consent before starting the ads SDK
iOS showConsentForm() and showPrivacyOptionsForm() no longer require an earlier AdMob.initialize() call. Both platforms can now follow this order:
import { AdMob, AdmobConsentStatus } from '@capacitor-community/admob';
let consent = await AdMob.requestConsentInfo();
if (consent.isConsentFormAvailable && consent.status === AdmobConsentStatus.REQUIRED) {
consent = await AdMob.showConsentForm();
}
if (consent.canRequestAds) {
await AdMob.initialize(); // Initialize once, then load ads.
}Call this from your app's startup flow when its native UI is ready, and handle failures. Existing initialize-first calls remain supported, but the consent-first order is recommended. This fixes the plugin reference used to present iOS consent forms; it does not upgrade UMP or change Firebase Consent Mode settings. (#479)
Handle Android initialization failures
AdMob.initialize() now waits for the native banner parent view. It can reject immediately if the activity/content view is unavailable, or after 5 seconds if the parent does not appear. This also affects apps using only full-screen ads. Catch initialization errors, keep the app usable without ads, and retry when the native view is available. (#452)
Review iOS revenue calculations
valueMicros now correctly reports millionths of a currency unit for all supported ad formats. For example, 0.0012 currency units now produces 1200; previously it was truncated to 0 on iOS. Divide by 1_000_000 for currency units on either platform. Remove any iOS-specific compensation in your analytics pipeline. Historical truncated values cannot be recovered by multiplying them. Android values and event names are unchanged. (#467)
Review ad-load error handling
SDK load failures from prepareInterstitial(), prepareRewardVideoAd(), and prepareRewardInterstitialAd() now reject with the native message and a string code. FailedToLoad events retain numeric codes, and iOS now reports the actual SDK code instead of a fixed 0.
Codes remain platform-specific, not normalized. Update handlers that compare the old iOS message Loading failed or assume code 0. These are observable error-path changes, not just new fields. (#482)
Other fixes and documentation
- Android banners respect Capacitor's safe-area handling without replacing the decor-view inset listener, and avoid adding keyboard height to banner margins. (#469)
- Android uses
proguard-android-optimize.txtto avoid AGP 9's rejection of the older default file. Library minification remains disabled; this does not upgrade your app's AGP or replace its other migration steps. (#480) - Guides are centralized at docs.rdlabo.dev and included under
docs/in the package. The demo now uses Capacitor 8.5.2, Angular 22, and Ionic 9; the Angular/Ionic upgrades are demo-only requirements.
The changes above belong to v8.2.0, not v8.1.0. The initially published migration/revenue guides incorrectly labeled some of them as 8.1.0; use this release's migration notes when upgrading from 8.1.0.
What's Changed
- Point READMEs to centralized documentation by @rdlabo in #447
- docs: centralize README content into docs guides by @rdlabo in #449
- docs: centralize guides under docs/ for docs.rdlabo.dev by @rdlabo in #453
- docs: link README guides to docs.rdlabo.dev by @rdlabo in #455
- docs: embed API references in guides by @rdlabo in #456
- fix(android): don't cache a failed banner parent lookup by @aYetik in #452
- chore: update demo to Capacitor 8.5 and SPM by @rdlabo in #462
- fix: update Safe Area handling for AdView layout in BannerExecutor by @luisbytes in #469
- fix(ios): report paid event value in micros by @lsgmasa33 in #467
- chore(demo): align Capacitor dependencies on 8.5.2 by @rdlabo in #475
- chore(demo): migrate to Angular 22 and Ionic 9 by @rdlabo in #476
- docs: document Capacitor upgrade and 8.1.0 behavior changes by @rdlabo in #478
- fix(ios): allow consent forms before SDK initialization by @rdlabo in #479
- fix(android): use AGP 9 compatible ProGuard defaults by @rdlabo in #480
- feat: expose rewarded ad click events by @rdlabo in #481
- fix: preserve native ad load error codes in rejected calls by @rdlabo in #482
New Contributors
- @aYetik made their first contribution in #452
- @lsgmasa33 made their first contribution in #467
Commits
- chore fcc4e8d
- fix: preserve native ad load error codes in rejected calls (#482) 9809772
- feat: expose rewarded ad click events (#481) b743d3c
- fix(android): use AGP 9 compatible ProGuard defaults (#480) 712e77b
- fix(ios): allow consent forms before SDK initialization (#479) 789f948
- docs: document Capacitor upgrade and 8.1.0 behavior changes (#478) d663cc3
- chore(demo): migrate to Angular 22 and Ionic 9 (#476) 95be72b
- chore(demo): align Capacitor dependencies on 8.5.2 (#475) 4ade775
- chore: update npm dependencies 91d3dc0
- fix(ios): report paid event value in micros (#467) e026ce6
- fix: update Safe Area handling for AdView layout in BannerExecutor (#469) 608213b
- chore: update demo to Capacitor 8.5 and SPM (#462) 2032c4d
- docs: link published guides to docs.rdlabo.dev 1fe972b
- docs: preserve generated reference and published guide links 9fa5cfe
- Merge remote-tracking branch 'origin/main' into docs/all-oss-onboarding c00fccb
- docs: clarify onboarding and guide progression a5554e4
- fix(android): don't cache a failed banner parent lookup (#452) 1e28259
- ci: publish gated beta candidates 30ade67
- chore(ios): refresh Swift package resolutions 33dfde7
- docs: embed API references in guides (#456) cd03417
- docs: link README guides to docs.rdlabo.dev (#455) 7aea141
- docs: link package homepage to documentation 7e4b1dd
- docs: add maintainer websites 1782836
- docs: centralize guides under docs/ for docs.rdlabo.dev (#453) cd5740c
- docs: centralize README content into docs guides (#449) eeccdff
- Point READMEs to centralized documentation (#447) 7421b9a
- docs: organize tutorials by advertising goal bfffb28
- docs: organize ad format tutorials 203dd0c