[Oztechan/AdTrack#132] Production AdMob App ID injection + release secrets - #160
Merged
Conversation
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
Codecov Report✅ All modified and coverable lines are covered by tests. 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 🚀 New features to boost your workflow:
|
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
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.
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
GADApplicationIdentifierwas a hardcoded test literal with no injection path. NowInfo.plistreads$(ADMOB_APP_ID)fromConfig.xcconfig(iOS test default), and fastlanebuild_projectoverrides it from theADMOB_APP_ID_IOSenv var when present (release only).Key.ADMOB_APP_ID_ANDROID; iOS readsADMOB_APP_ID_IOS— matching the per-platform ad-unit-id pattern. (Defaults are Google's two distinct test App IDs.)release.yml): passesADMOB_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.commonsecret(): an unset GitHub secret expands to an empty env var; a blank value now falls back to the default instead of an empty id. (buildSrcgetSecret, 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)
secret.propertiesfor 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…~3347511713by default),:common:compileKotlinIosSimulatorArm64all green.Info.plist(plutil),Fastfile(ruby -c), andrelease.yml(YAML) validated. The real-id injection is exercised by a release run once the secrets are set.https://claude.ai/code/session_01BhF4tpJYkiDSSJVoe63Vtk