Repository navigation
feat(ads): admob adapter - #2023
Merged
Merged
Conversation
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
peterporfy
commented
Oct 12, 2026
peterporfy
force-pushed
the
porfy/react-native-admob-adapter
branch
from
October 14, 2026 13:09
a8e25d1 to
bbc0f36
Compare
tonidero
approved these changes
Oct 15, 2026
peterporfy
force-pushed
the
porfy/react-native-admob-adapter
branch
from
October 15, 2026 14:34
ff5ef82 to
ed74ab0
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1d2639c. Configure here.
peterporfy
added a commit
that referenced
this pull request
Oct 16, 2026
## Description Rewrites the `adsTester` example to use the `react-native-purchases-admob` adapter from #2023, split out so the adapter PR stays reviewable on its own. Stacked on #2023. ## Changes ### Examples - `adsTester` rewritten to use the adapter ## Tests - full e2e simulator test with all ad formats, against production system, both with android and ios builds <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Changes are limited to the example app and its bundler/tsconfig wiring; no production SDK behavior is modified in this diff. > > **Overview** > **Rewrites the `adsTester` sample** so it exercises `react-native-purchases-admob` instead of hand-rolling AdMob SSV tokens, polling, and a single rewarded-interstitial flow. > > The UI becomes a scrollable dashboard: reusable **FormatCard** load/show cards for interstitial, rewarded, rewarded interstitial, and app open (plain `showAndTrack` vs `showWithRewardVerification` on rewarded formats), plus a bottom **banner** wired through `useTrackingBannerAdProps`. Manual `uuid` / `generateRewardVerificationToken` / `pollRewardVerification` code is removed in favor of adapter factories and show helpers. > > **Monorepo wiring** mirrors `react-native-purchases`: Babel alias, TypeScript paths, and Metro `watchFolders` / `extraNodeModules` resolve the adapter from source and dedupe `react-native-google-mobile-ads` (including blocking the adapter workspace’s `node_modules`). Dependencies drop `uuid` and `react-native-get-random-values` and bump **react-native-google-mobile-ads** to ^17. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit f3a852d. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Description
Adds
react-native-purchases-admob, a new automatic ad tracking package covering the 3rd partyreact-native-google-mobile-adspackage. This is the most commonly used admob package available for admobThe
adsTesterexample changes that exercise it are in the stacked PR.Changes
Adapter
RevenueCatAdMob.create{Interstitial,AppOpen,Rewarded,RewardedInterstitial}Ad(adUnitId, options)creates the ad and tracks loaded, failed-to-load, displayed, opened and revenue.trackAd(ad, options)does the same for an ad the app created.showAndTrack(ad, { placement })for show-time placement overrides.useTrackingBannerAdProps(...)(hook) /trackingBannerAdProps(...)for<BannerAd>,trackNativeAd(nativeAd)for native ads,impressionIdOf(ad).createRewardedAd(id, { enableRewardVerification: true })attaches the token as SSV options at creation. The library only accepts them there.showWithRewardVerification(ad, callbacks)polls and returns aVerifiedReward.AdCaptureMethod.reactNativeAdMobAdapter.Example usage
Why 17.x
17.0.0 added
ResponseInfoon loaded events, theIMPRESSIONevent,PaidEvent.valueMicrosanderror.reason.The adapter needs all four. Verified on 17.0.0, 17.1.0 and 17.2.0.
The only exception is rewarded ad ssv, where we are using our custom impression id, because it is not available properly yet in the API. We might change it in the future.
Core SDK
captureMethodso the new adapter can pass in the new capture method typeExamples
adsTesterrewritten to use the adapter in the stacked PRRelease wiring
npm publishinrelease.analyse_js.tslintalready crashes onmainunder TypeScript 5.4.5; not addressed.Tests
adsTesterfrom the stacked PRNote
Medium Risk
New monetization surface (ad events and server-side reward verification) with complex lifecycle edge cases, though failures are mostly logged and tracking calls are non-throwing.
Overview
Introduces
react-native-purchases-admob, a new workspace package that bridgesreact-native-google-mobile-ads(17+) to RevenueCat’sPurchases.adTrackerand reward-verification APIs.The
RevenueCatAdMobAPI replaces or wraps ad creation (createInterstitialAd,createAppOpenAd, async rewarded variants), attaches listeners for load/display/revenue/failure events, and forwards them with placement overrides andAdCaptureMethod.reactNativeAdMobAdapter. Banners useuseTrackingBannerAdProps/trackingBannerAdProps; native ads usetrackNativeAd. OptionalenableRewardVerificationpins a pre-request impression id, injects AdMob SSV options, blocks unsafe reloads, andshowWithRewardVerificationpolls RevenueCat after the user earns a reward.Core
react-native-purchasesgainsAdCaptureMethodand an optionalcaptureMethodon ad tracking / reward metadata types (marked@internalfor official adapters).Release and CI: the adapter is added to yarn workspaces, root publish exclusions, Jest ignore paths, CircleCI prepare/API/unit steps, and Fastlane version bumps plus a fourth
npm publishin the release lane.Reviewed by Cursor Bugbot for commit 567b4fb. Bugbot is set up for automated code reviews on this repo. Configure here.