Documentation comes from this release commit, without inheriting newer content. Commit: cc3dd17e61.
Google AdMob Ads — Integration Guide
How Magic Piano serves ads through Google AdMob (react-native-google-mobile-ads) behind
the in-app @core/ads port (AdsService / AdsNativeAdapter). AdMob replaced IronSource
LevelPlay in Phase 1 of the move; Phase 2 added the iOS mediation adapters for ten other
networks (§11).
TL;DR — the things that bite
- No App ID in Info.plist = crash at launch. The react-native-google-mobile-ads config
plugin bakes
GADApplicationIdentifierat prebuild fromEXPO_PUBLIC_ADMOB_IOS_APP_ID(config/admob-app-id.ts); a missing one fails the prebuild. - Google's demo units only fill under Google's demo App ID. Test-ID mode
(
EXPO_PUBLIC_ADMOB_USE_TEST_IDS=1) switches both together — the App ID is baked at prebuild, so switching needsexpo prebuild+ a rebuild, never just a Metro reload. Demo units under the real App ID come back no-fill (Guitar learned this in QC, commit53e2cdd). - Two units per format. Interstitial, rewarded and App Open keep both High and All loaded at once and take High first at show time (§3); the banner still asks one tier at a time, High before All.
- Consent (UMP), then ATT, then the SDK. The engine does not start the SDK until Google's UMP
allows ads (
canRequestAds); ATT decides only whether the SDK can read the IDFA. No request asks for non-personalised ads (requestNonPersonalizedAdsOnly) — the TCF signal from UMP does that job (§4). - The SDK has one
errorevent for load and show failures. The adapter tells them apart by whether it was asked to show. - Pods are pinned exactly. RNGMA 17.4.0 →
Google-Mobile-Ads-SDK13.10.0 andGoogleUserMessagingPlatform3.1.0. Every mediation adapter inconfig/admob-mediation-adapters.tsis pinned too and must accept 13.10.0 (§11). - An adapter does nothing until the dashboard uses it. A network serves only once it sits in the mediation group of the ad unit being asked — set that up for the High and the All unit.
- App Open has one unit, All only.
EXPO_PUBLIC_ADMOB_IOS_APP_OPENis in.env; there is no_HIGH, so every load asks the All unit. It sends no analytics, and the rules for when it shows live outside the engine (§6).
Architecture — ports & adapters
Ads live behind @core/ads (clean-architecture port, same pattern as @core/iap). Features and
business logic (ads.ts) talk only to AdsService via getAdsService() — never to the SDK.
composition-root.tsreads the unit ids, builds the adapter with ATT + the paid-impression sink, and wires tracking / lifecycle / gate.- App Open is driven by
AppOpenHost(root layout) throughapp-open.ts, not byads.ts: the host says when (after the splash on a cold launch from launch #2; on a background → active switch), the runtime reads the facts and asks the pure ruleapp-open-policy.tswhether it may show. The engine only loads and shows it. Rules: ad-trigger-logic.md §6. EXPO_PUBLIC_APP_VARIANT=simswaps inNoAdsAdsService(no SDK at all).- Dispose on no-ads: entitlement sync / mid-session premium calls
disposeCache().
1. Dependency & versions
17.4.0 pins Google-Mobile-Ads-SDK 13.10.0 and UMP 3.1.0 exactly (17.2.0 came with iOS 27
support, 4ab82a74, on GMA 13.6.0; Phase 2 was built on 16.5.0 and GMA 13.5.0). The podspec lets a Podfile
override the GMA version with $RNGoogleMobileAdsSDKVersion; nothing needs it. v17 exposes
ResponseInfo, so the winning network is named in ad_source (§8), and it allows the newest
Pangle adapter (§11).
2. App ID & test-ID mode
The prebuild refuses a missing real App ID, and refuses Google's demo App ID outside test-ID mode. Android is not shipped yet: its App ID is Google's demo one as a placeholder (the manifest must have one) and no Android unit is configured, so Android never requests an ad.
Test devices. Simulators are test devices automatically, so real units serve test ads there. A real device running a dev build with real units gets REAL ads — register it in AdMob → Settings → Test devices, or build with test-ID mode.
3. Ad units & tiers (High → All)
Env (tracked .env — public client ids):
ad-units.ts resolves them: a High that is empty or equal to its
All is dropped, and tierOrder() gives the order a load asks them in.
App Open is off while its units are unset (Android: EXPO_PUBLIC_ADMOB_ANDROID_APP_OPEN[_HIGH]).
Test-ID mode uses Google's demo App Open unit — iOS ca-app-pub-3940256099942544/5575463023,
Android ca-app-pub-3940256099942544/9257395921. It is the engine's third fullscreen format
(preloadAppOpen / isAppOpenReady / showAppOpen), on the same tiers, pools, parking and
watchdog, but sends no analytics (§8), is not preloaded by start(), and an ad older than 4 h
is retired by the SDK pool itself (isStaleByPolicy), so a show never takes it.
Fullscreen (engine). The engine never loads an ad: each format keeps two tier slots warm at
once — High and All — and each slot owns one SDK preload pool for its unit
(ads-engine.ts, TierSlot). preload() creates the High pool,
then the All pool after a random 200–500 ms jitter (magicPad's CoPreloadFormat), and then leaves
them alone: warming a warm slot is a no-op, so spamming preload() is still one pool per unit.
show() (SelectTier) takes from High's pool while it is ready, else All's, else it fails
at once — no wait for a load in flight — and warms both again. A pool that claimed ready but
polls empty or fails, or that hands over an ad past its shelf life, falls through to the other
tier. A taken ad is shown once and destroyed; the SDK refills the pool by itself.
There is no retry ladder, load timeout or eviction in the engine any more — what they guarded
against, the SDK preloader does (it paces its own retries, retires old ads and refills after a
take), and nothing the app does can spam the ad network. The one thing the app owns is a pool
that failed (the SDK refused it, or its preload reported an error): the next preload() or
empty show builds it again, at most once per poolRecreateMinIntervalMs (60 s, pool-policy.ts).
The banner and the Full Screen Native ad keep the 5 s → 60 s ladder (tier-cache-policy.ts).
Preload pools. admob-sdk.ts creates one pool per
unit and format (AdPools.create(AdPoolPresets.fullscreen(…))) and
admob-native-adapter.ts wraps it as a
NativeAdInventory: readiness is a cached answer fed by the pool's available / exhausted
events and its getAvailability() count at creation (an upper bound — a stale ad is only found
out by the take); take() is one poll(). The show-phase listeners are attached to the one ad
taken, not to the pool's stock. A held ad past the SDK's staleness window (isStaleByPolicy: 1 h,
App Open 4 h) is dropped at take time. Pool depth is planned by
pool-policy.ts inside Google's default app-wide cap of 6
buffered ads (the real cap is server-delivered; the SDK trims a deeper request and
createFullscreenPool reports the depth it granted): depth 1 each, extra depth only for the All
unit of interstitial then rewarded when units are left over — never High, which seldom fills. A
format the platform has no preloader for reports pool-unavailable rather than crashing;
disposeCache() disposes every inventory, destroying its pool, so a premium / no-ads user stops
buffering. Every ad taken for a show is destroyed when the show ends. Funnel note: *_request now
marks a pool being created or refilling after a take, and *_request_success a pool reporting an
ad, so their volume no longer lines up with magicPad's. The log shows the wait: READY — … Nms after it was asked, pool ad TAKEN — … poll took Nms.
Banner. banner-tiers.ts: High's view first; if it does
not fill, it is replaced by All's view; if All does not fill either, the view goes away and,
after a backoff, the banner retries from High on its own — an unbounded 5 s → 60 s ladder
(tier-cache-policy.ts), no cycle limit. A filled view is refreshed by the SDK on its own
schedule; a failed refresh keeps the ad on screen. Every tier asked reports bannerads_request /
_request_success / _request_failed (§8), retries included. Unlike the fullscreen formats, the
banner does not keep both tiers warm, but since 2026-10-05 it keeps its one view loaded between
screens: react-native-google-mobile-ads can only mount or unmount a <BannerAd>, so the view
lives in the root BannerHost (§7) and waits outside the window while no banner screen is open.
Outside the window, not transparent: on the simulator (2026-10-05) a transparent banner recorded an
impression (PAID) on load and on every 60 s refresh, while one outside the window recorded none
and did not refresh until it was shown. A second, hidden tier view is still never kept.
4. Consent (UMP), ATT, IDFA & personalisation
Order. requestAttThenPreloadAds() (att-flow.ts) runs
consent (UMP) → ATT → preloadAds() (ad-privacy-prompts.ts),
at the same two moments ATT always had: the end of the onboarding song for a player still in the
FTUE funnel, and the boot ATT step (splash) for everyone past it. The engine then awaits
getAdsConsentFlow().whenAdsAllowed() before adapter.requestTracking() and init()
(setConsentGate, wired in composition-root.ts), so no path — preload, App Open, banner —
starts the SDK without consent; a false keeps it off for the whole run.
Consent flow (src/core/ads/consent/) — one run per app launch:
Rules are pure in consent-policy.pure.ts; the
SDK sits behind AdsConsentPort (admob-consent-adapter.ts);
sim / e2e builds use FakeConsentPort (no consent needed, no form). Settings shows "Privacy
choices" (showPrivacyOptionsForm) only when UMP says the entry is required
(selectShowPrivacyChoicesRow, ads-consent-store.ts).
Every user is asked, premium included; a player who refuses consent is still asked ATT. Refusing
is still an answer: UMP keeps canRequestAds true and Google serves Limited Ads (not
personalised, lower fill). Ads stay off only while the form is left unanswered.
AdMob console. The form only shows once a GDPR (and, if wanted, US states) message is published under Privacy & messaging, with every mediation network in its ad partners. Leave UMP's "IDFA explainer" off — the app times ATT itself, and it would make three prompts in a row.
QA. TestFlight / store builds have no switch: test them from a regulated region over a VPN
(UMP locates the player by IP), turned on before the app opens. Dev builds can fake the region
instead with EXPO_PUBLIC_UMP_DEBUG_GEOGRAPHY (eea | us | not_eea | other) and
EXPO_PUBLIC_UMP_TEST_DEVICE_IDS (comma separated hashed ids, printed by the UMP SDK in the Xcode
log; simulators need none) in .env.local; release builds ignore both. Deleting the app resets
the stored answer (and ATT).
ATT decides one thing: whether the SDK can read the IDFA. Every request — interstitial, rewarded,
App Open, banner — is the same whatever the answer; none sets requestNonPersonalizedAdsOnly.
Until 2026-10-19 every answer but granted asked for non-personalised ads. An iPad QC that day
(ATT denied, 18 requests a cell) measured what that flag cost on its own: App Open filled 2/18 with
it and 15/18 without; on Interstitial All, networks other than Google won 12/18 with it and 17/18
without, and Meta never won while it was set. Non-personalised ads are a consent question
(GDPR in the EEA, the UK and Switzerland), not a tracking one. That is answered by the consent form
above — Google's UMP, whose IAB TCF signal the SDK and the mediation networks read by themselves.
Nothing else raises the prompt. AppsFlyer starts at every launch and never asks
(appsflyer-attribution-service.ts): its 7.x SDK has no
wait-for-ATT option, and asking there put the prompt on a new player's onboarding screen.
5. The adapter — SDK events → port
Errors arrive namespaced (googleMobileAds/no-fill). show() takes no placement — the engine
logs it. destroy() on a taken ad calls the installed SDK's destroy() for every fullscreen
format, releasing the native ad and its native event subscription as well as JS listeners. Merely
calling removeAllListeners() leaves the native inventory alive after the show or cache disposal.
Destroying is idempotent, and an ad a poll hands out after its inventory was disposed is destroyed
on arrival.
6. Engine protections
The show-time load grace (RC ads_show_load_grace_ms) is retired along with the RC key itself —
the engine never waits at show time any more; §3 has what
replaced it. The separate prefetch-on-display buffer is gone too: a shown or failed-to-show tier
reloads itself instead. What remains: 8 s display watchdog · close settle deferred until
foreground · the missed-close fallback (below) · parking during gameplay (pool creation and rebuild are parked too) · the rate-limited rebuild of a failed pool (§3) ·
the already-showing guard against a second trigger · the entitlement gate and the QA "Show Ads
for Subscriber" toggle.
Missed-close fallback. An ad can come up and be closed with neither OPENED nor CLOSED
ever arriving, only PAID (seen on device: zero revenue, display confirmed by the impression ~1 s
late). The show then never settled: whatever waited on it (the Learn stage card, a Result
navigation) stayed stuck, and the format answered already-showing to every later trigger until
the app was killed. The SDK module's own missed-close recovery is armed by OPENED, so it never
ran. Once an ad is confirmed on screen, the engine listens for a touch on the app's own views
(the root view's responder capture, app-touch.ts, never claiming
the touch): an ad on screen takes every touch itself, so a touch reaching the app proves the ad is
gone, and the show is closed exactly as CLOSED would close it — same onClosed tracking, a
rewarded keeps its reward or is reported reward_not_earned. A touch within
closeFallbackArmMs (1 s) of the display is ignored; the listener stops when the show ends any
way. The engine log line is CLOSE MISSING. The business caps and flows stay in
ads.ts (15 s / 30 s intervals, Flow A / B, pause interstitial,
rewarded backfill video) — see ad-trigger-logic.md. App Open's caps
(120 s since the last App Open, 60 s since the last interstitial or rewarded) are not in
ads.ts either: they live in app-open-policy.ts, fed by the display timestamps
ad-lifecycle.ts keeps in memory (see ad-trigger-logic.md §6).
7. Banner — BannerHost and BannerSlot
BannerHost, at the root under the paywall hosts, owns the
app's only AdMobBanner (BannerAd, BANNER
320×50).
- When it loads: once the ads SDK is ready. The app's own flows start it (boot ATT, the end of
the onboarding song, the Song List preload, any rewarded / interstitial); while the banner is
wanted and the SDK is not ready,
useAdsServiceReadyalso asks for an init-only start throughstartAdsForBanneronce a second — but only for a player past the FTUE funnel (shouldBannerStartAds), because a start asks for tracking and that prompt waits for the end of the first song. So a banner screen opened before any other flow started the SDK (a skipped onboarding, a preload cancelled with the Song List's focus) no longer waits for the first rewarded show. - Where it shows: in the most recently opened
BannerSlot, which each banner screen renders where its banner sits. The slot reserves 320×50 and reports its window position. Every slot is open only while its screen is focused (bannerSlotOpen): a screen another one is pushed over stays mounted, and a slot left open there drew the banner over the new screen (the Shop opened from the result's No Ads popup, 2026-11-18). The Shop is never a banner screen, in any arm. - Hidden: with no slot open, the banner stays loaded outside the window, untouchable. The SDK neither counts an impression for it nor refreshes it until it is shown (§3).
- Rules: in
banner-host.pure.tsandbanner-host-store.ts.- Premium / no-ads players hold no banner.
- A fullscreen ad hides it, except in the result slots (
duringFullscreenLatch). - An in-screen popup with a scrim (
PopupOverlay— Learn's popups) hides it while open: the popup lives inside the screen tree, under the banner the host draws over every screen. - A Game Mode song drops it from the countdown until the engine's
melodyEnded(the last note has ended, at least 2.5 s before the result), unless a slot is open: the pause menu asks for its own.
- Placements:
keyboard,sessionResult,fullSongUnlocked,sectionComplete,pause.
7b. Full Screen Native (FSN)
A native ad shown full screen right after an interstitial or a rewarded video that showed, for the
installs whose mon_pkg arm asks for it (rules: ad-trigger-logic.md §7).
It is not an engine format:
- Native side:
modules/fullscreen-native-ad, iOS only — a Swift port of magicPad'sFsnAdBridge.mon the Google Mobile Ads SDK that react-native-google-mobile-ads already ships. It keeps one native ad per slot and presents it over the app: black screen, "Ad" badge + headline + icon, media, CTA, and a close button with a 3 s countdown under AdChoices. It follows the app's orientation, closes itself after an ad tap, and drops an ad older than 1 h. - Rules:
FsnControllerloads a slot only while it is open (fsn-policy.ts: arm, D1 / Habit, not premium / No Ads), retries a failed load on the 5 s → 60 s ladder (the SDK never retries a native load), shows only an ad already loaded — never waits — and loads the next one after a close. - Ad break:
FsnAdBreakAdsServicewraps the ads service, soshowInterstitial/showRewardedresolve only once the FSN after them is closed. No caller changes; a rewarded caller applies the reward after the FSN, and the 15 s / 30 s pacing counts from the end of the break. While it is up the app's full-screen-ad state is on, as for an interstitial. - Units: one per slot, All only, iOS only. Test-ID mode uses Google's demo native unit
(
ca-app-pub-3940256099942544/3986624511) for both — the native video demo unit answered "No ad to show" on the device. The two units must be Native format in AdMob, and native mediation needs its own mediation groups — not every network serves native through AdMob. - Native build: the module is native code, so a binary built before it has no FSN (the port reports unavailable and every slot stays shut).
8. Analytics
- Full Screen Native sends its funnel (
nativeads_request/_request_success/_request_failed/_show_ready/_show_notready/_show_failed),nativeads_show/nativeads_click(withtrigger=after_fs/after_rv), each withconnection, and itsad_impression/ad_impression_ama(ad_format: "fullscreen_native",ad_unit_name: "FSN_Inter"/"FSN_RW") plus AppsFlyeraf_ad_revenue. See analytics-events.md. - App Open sends
openads_*and itsad_impression/ad_impression_ama(ad_format: "app_open",ad_unit_name: "Open_All") plus AppsFlyeraf_ad_revenue. See analytics-events.md for the events and theirlocation. fail_reason(ad-fail-reason.ts), at most 100 characters. What the SDK reported:<code>: <message>with thegoogleMobileAds/namespace dropped (no-fill: Request Error: No ad to show.). What the app decides, magicPad's own wording where noted:both_tiers_empty(an interstitial show found neither tier loaded) /show_no_ready(the same, rewarded or App Open) /launch_wait_5s(the cold-launch App Open had nothing loaded after its 5 s wait) — always with no unit, and on*_show_notreadyonly;load_timeout_90s(a load attempt the SDK never answered within 90 s);show_exception: <message>(the show call threw);fullscreen_content_failed(the SDK failed to present and said nothing);display_timeout(the 8 s show watchdog);reward_not_earned(a rewarded the player closed before earning it —*_show_failedonly, after*_show).*_show_notreadynever names a unit or carries any reason but the three above;*_show_failedalways names one, and never saysno_fillor reports an empty show — the two events answer different questions: was there an ad, and did the ad we had reach the player. Retired:sdk_not_loaded— a tier the SDK quietly dropped is now just not picked, and the reason stays onTierSnapshot.lastErrorand the ads log, never on a tracked event — andloading, kept only so an old event still has a name for the value it carried before this build (there is no show-time wait left to run out of). RNGMA 16 has no per-network mediation error — that needsResponseInfo(v17).- Ready means a tier holds a loaded ad and the SDK's own
loadedflag agrees (NativeAdHandle.isLoaded()). - A tracking hook that throws (a dev build rejects invalid event params) is written to the ads log and dropped: it never stalls the load or show it reports on.
ad_source: the network that filled (loadedAdapterResponse.adSourceName, RNGMA 17: "AdMob Network", "AppLovin", "Liftoff Monetize"…).- A banner reads it from its
PAIDevent'sresponseInfo. - A pooled interstitial, rewarded or App Open reads it from the ad's own
responseInfowhen it is taken out of its pool, because itsPAIDevent carries none (seen on build 25). - An impression without either says
admob. The adapter class (adapterClassName) goes to the ads log with the impression (source=… adapter=…), not to analytics. It names the network behind an ad that reports neither its display nor its close (§6, footgun #9).
- A banner reads it from its
- Currency: AdMob reports revenue in the AdMob account's currency. The
ad_impressionschema only takesUSD, so a non-USD value is sent to Firebase WITHOUTvalue/currency(never mislabelled, never a dev-time throw) and logged; AppsFlyer gets the real currency and converts it. Keep the AdMob account on USD. - Precision (
RevenuePrecisions) is logged, not sent — no schema field. - If the AdMob app is ever linked to the Firebase project, the SDK also logs Firebase's own
automatic
ad_impression— check revenue is not counted twice.
9. QA — AdMob Ad Inspector
Dev builds show an ADS TEST pill on the Song List header
(AdInspectorButton) → getAdsService().openAdInspector()
→ MobileAds().openAdInspector(): every ad unit's request log, the mediation waterfall per
request, and SDK/adapter status. Release builds never render it. The SDK opens it only on a
test device; on a real phone the first tap is refused with error 22, whose message names the
phone's test id — admob-sdk.ts registers that id for the session (dev builds only) and opens
the inspector on the retry, so from then on the phone is served test ads. Once the mediation groups exist,
open an ad unit to see its ad sources and whether each adapter was found, and use Single ad
source test to force one network and check that it fills — on a real device, a test device in
AdMob.
The engine keeps a 200-line log (getAdsLog() / subscribeAdsLog()). Set
EXPO_PUBLIC_ADS_DEBUG=1 in .env.local (restart Metro with -c) to mirror it to the Metro
console: [ads:interstitial] LOAD FAILED — tier=high …, retry #1 in 5000ms — tier=high …,
LOADED — tier=all …, [ads:paid] rewarded high value=… USD, and so on — the quickest way to
watch the tiers work.
10. Info.plist — SKAdNetwork & ATS
- SKAdNetwork:
config/skadnetwork-items.ts— 193 ids, reconciled on 2026-09-21 with the list each mediation network publishes (Google's AdMob partners, AppLovin, Unity Ads, Mintegral, Pangle, Meta, InMobi, Liftoff Monetize, DT Exchange). The former LevelPlay export (173) lacked 20 of InMobi's and DT Exchange's, DT Exchange's own9g2aggbj52among them. Moloco publishes none and asks for no manual entry. - AdAttributionKit:
AdNetworkIdentifiers— Liftoff Monetize's 6.adattributionkitids, which it requires alongsideSKAdNetworkItems(InMobi's 3 are among them). - ATS
NSAllowsArbitraryLoads: true, and nothing else. InMobi and DT Exchange ask for plain HTTP, and AppLovin's guide to mediated networks asks for this key alone. Do not add Google'sNSAllowsArbitraryLoadsForMedia/…InWebContent: once either is present iOS ignoresNSAllowsArbitraryLoads, and this key already allows what they would. - Meta on iOS 16 (open): Meta asks apps to call
FBAdSettings.setAdvertiserTrackingEnabledbefore the ads SDK starts, and says iOS 17+ no longer needs it. The app targets 16.4, so Meta demand on iOS 16 devices runs without that signal until a native hook sets it from the ATT answer.
11. Phase 2 — mediation adapters
iOS only (Android ads are not shipped). The adapters are Google-built pods listed in
config/admob-mediation-adapters.ts;
app.config.ts hands them to expo-build-properties ios.extraPods, and Expo's autolinking adds
them to the app target at pod install. No JS talks to them — the Google Mobile Ads SDK loads
each adapter by class name when a mediation group asks for its network.
Pins. Every adapter podspec declares the GMA range it accepts; all twelve above say ~> 13.3
(≥ 13.3, < 14), so they sit on RNGMA's 13.10.0. Before bumping one, read the new release's
Google-Mobile-Ads-SDK dependency on the CocoaPods trunk — a release that needs a newer GMA
fails pod install. Pangle stays on the adapter picked under GMA 13.5.0, when every newer
stable one needed ~> 13.6; 13.10.0 now meets that, so it can move up in a change of its own.
BIGO Ads and BidMachine (added 2026-10-19, ahead of their dashboard setup) are bidding
partners for every format. Their SKAdNetwork ids are in
config/skadnetwork-items.ts; BidMachine's AdAttributionKit ids
were already there. Before they can bid, the PO needs, for each network: the Magic Piano iOS app
registered (BIGO reviews it before any ad slot can be made), a bidding placement per format (BIGO
Slot ID; BidMachine Source ID + Placement ID), the network added as a Bidding ad
source to every mediation group — Interstitial, Rewarded and Banner, High and All, and a group for
App Open, which has none yet — and its lines in app-ads.txt.
Dead-strip — checked, nothing to change. The SDK looks adapters up by class name, so a
Release link that strips them would fail only at runtime. A Release build (2026-09-21) still held
all ten GADMediationAdapter* classes then; BIGO Ads' and BidMachine's are unchecked. Re-check
after a toolchain or pin change with
strings -a MagicPiano.app/MagicPiano | grep '^GADMediationAdapter' (the LevelPlay build needed
DEAD_CODE_STRIPPING = NO; these pods do not).
Size. The four dynamic frameworks add about 26 MB to the simulator build; the six static SDKs land in the main binary. Read the real download size per device in App Store Connect.
What only the dashboard can do. An adapter serves nothing until its network sits in the
mediation group of the ad unit being asked. Each format needs a group covering both its High and
its All unit, with the network's own app / placement ids mapped in AdMob. Until then the SDK's
cached config lists only GADMAdapterGoogleAdMobAds for the units, and no adapter initialises.
Keys & where they come from
All AdMob ids are public client ids in the tracked .env — prebuild (App ID) and the
bundle (units) read them from the checkout, on CI too (App Open has its All unit only — no
_HIGH). They are NOT CI secrets:
the ios_internal job in .gitlab-ci.yml fails the build if the job env defines one (a defined variable, even empty,
shadows .env) or if .env lacks one, and clears Metro's cache so the bundle re-inlines them.
When a Metro reload is enough vs. a full prebuild
References
- react-native-google-mobile-ads: https://docs.page/invertase/react-native-google-mobile-ads
- AdMob iOS — impression-level ad revenue: https://developers.google.com/admob/ios/impression-level-ad-revenue
- AdMob iOS — Ad Inspector: https://developers.google.com/admob/ios/ad-inspector
- AdMob mediation adapters (iOS): https://developers.google.com/admob/ios/choose-networks