Skip to content

[Oztechan/AdTrack#132] Production AdMob App ID injection + release secrets - #160

Merged
mustafaozhan merged 3 commits into
developfrom
132/Ads-production-admob-ids
Aug 29, 2026
Merged

[Oztechan/AdTrack#132] Production AdMob App ID injection + release secrets#160
mustafaozhan merged 3 commits into
developfrom
132/Ads-production-admob-ids

Conversation

@mustafaozhan

@mustafaozhan mustafaozhan commented Aug 26, 2026

Copy link
Copy Markdown
Member

Closes #132. The go-live step for the ads epic #121 — wires the injection paths for real AdMob ids while keeping test defaults for debug/CI.

Code changes

  • iOS App ID injection (the real gap): GADApplicationIdentifier was a hardcoded test literal with no injection path. Now Info.plist reads $(ADMOB_APP_ID) from Config.xcconfig (iOS test default), and fastlane build_project overrides it from the ADMOB_APP_ID_IOS env var when present (release only).
  • Per-platform App IDs: the AdMob console registers the Android and iOS apps separately, so each has its own App ID. Android reads Key.ADMOB_APP_ID_ANDROID; iOS reads ADMOB_APP_ID_IOS — matching the per-platform ad-unit-id pattern. (Defaults are Google's two distinct test App IDs.)
  • CI (release.yml): passes ADMOB_APP_ID_ANDROID, ADMOB_APP_ID_IOS, and the per-format ad unit id secrets as env, mirroring the OAuth vars. Each falls back to Google's test id when the secret is unset.
  • Hardened common secret(): an unset GitHub secret expands to an empty env var; a blank value now falls back to the default instead of an empty id. (buildSrc getSecret, used for the Android App ID, already handled empty env.)
  • docs/admob-go-live.md: the keys, where each is consumed, and how to set them.

Not in this PR (your console/secret tasks — documented)

  • Create the Android + iOS apps and ad units in the AdMob console; copy the real per-platform App IDs + unit ids.
  • Add them as GitHub Actions secrets (and to local secret.properties for local release builds).

No real ids are committed; everything still defaults to Google's public test ids.

Verified locally

detektAll, :androidApp:assembleDebug (manifest resolves to the Android test App ID …~3347511713 by default), :common:compileKotlinIosSimulatorArm64 all green. Info.plist (plutil), Fastfile (ruby -c), and release.yml (YAML) validated. The real-id injection is exercised by a release run once the secrets are set.

https://claude.ai/code/session_01BhF4tpJYkiDSSJVoe63Vtk

Adds the injection paths so real AdMob ids replace the test defaults for release,
while debug/CI keep working with no config.

- iOS App ID: was a hardcoded test literal with no injection path. Now Info.plist
  reads $(ADMOB_APP_ID) from Config.xcconfig (test default), and fastlane
  build_project overrides it from the ADMOB_APP_ID env var when present (release).
- release.yml passes ADMOB_APP_ID + per-format ad unit id secrets as env, mirroring
  the OAuth vars; each falls back to Google's test id when the secret is unset.
- Harden common secret(): a blank value (unset GitHub secret -> empty env var)
  now falls back to the default instead of an empty id.
- docs/admob-go-live.md: the keys, where each is consumed, and how to set them.

Android App ID + all ad unit ids already read env/secret with a test fallback, so
they only need the secrets wired (documented). No console/secret values committed.

Claude-Session: https://claude.ai/code/session_01BhF4tpJYkiDSSJVoe63Vtk
@mustafaozhan mustafaozhan self-assigned this Aug 26, 2026
@mustafaozhan mustafaozhan added this to the 1.0.0 milestone Aug 26, 2026
@codecov

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.63%. Comparing base (f44885a) to head (d5bc1d4).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #160   +/-   ##
========================================
  Coverage    63.63%   63.63%           
========================================
  Files           69       69           
  Lines         1031     1031           
  Branches       115      115           
========================================
  Hits           656      656           
  Misses         321      321           
  Partials        54       54           

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

The App ID is per-app in the AdMob console, so Android and iOS need different
ones. Replace the single ADMOB_APP_ID secret with ADMOB_APP_ID_ANDROID and
ADMOB_APP_ID_IOS (matching the per-platform unit ids). Defaults were already the
two distinct Google test App IDs; only the secret/env key was shared.

- Key.ADMOB_APP_ID -> Key.ADMOB_APP_ID_ANDROID (Android manifest).
- fastlane build_project reads ADMOB_APP_ID_IOS for the iOS build-setting override.
- release.yml passes both per-platform secrets; docs updated.

Claude-Session: https://claude.ai/code/session_01BhF4tpJYkiDSSJVoe63Vtk
@mustafaozhan
mustafaozhan merged commit 3b84c75 into develop Aug 29, 2026
11 checks passed
@mustafaozhan
mustafaozhan deleted the 132/Ads-production-admob-ids branch August 29, 2026 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ads: wire real production AdMob App IDs (Android secret + iOS injection)

1 participant