Skip to content

fix(v2): iOS xcodebuild compile — switch to v11 ObjC AdMob/UMP API (#102) - #103

Merged
wei18 merged 1 commit into
mainfrom
fix/ios-mobileads-in-scope
May 23, 2026
Merged

wei18 merged 1 commit into
mainfrom
fix/ios-mobileads-in-scope

Conversation

@wei18

@wei18 wei18 commented May 23, 2026

Copy link
Copy Markdown
Owner

Closes #102. Code targeted AdMob v12/UMP v3 Swift API but Package.swift pins v11.13.0 + 2.x (ObjC-only). 11-line rename to GADMobileAds.sharedInstance(), UMPConsentForm.loadAndPresentIfRequired etc.

Code Reviewer APPROVE. iOS + macOS BUILD SUCCEEDED. Tests 87/87. Isolation grep 1 hit.

§未決 routed to backlog: v12 upgrade (foundations), iOS-in-PR-CI (methodology).

)

Closes #102. Pre-existing iOS xcodebuild failure (only revealed after
#101 fixed macOS link, allowing iOS compile to actually run):

  LiveAdMobBridge.swift: cannot find 'MobileAds' in scope
  UMPConsentPresenter.swift: cannot find 'ConsentForm' in scope

Root cause: code targeted AdMob v12 / UMP v3 Swift-native API
(`MobileAds.shared`, `ConsentForm.loadAndPresentIfRequired`), but
Package.swift pins GoogleMobileAds 11.13.0 + UMP 2.x which only expose
ObjC names — no NS_SWIFT_NAME overlays for the unprefixed symbols.

Verified against installed xcframework headers:
- GADMobileAds.h:34 sharedInstance() ✓
- UMPConsentInformation.h:52 sharedInstance (class property) ✓
- UMPRequestParameters.h:4 default init ✓
- UMPConsentForm.h:24 loadAndPresentIfRequired(from:completion:) ✓

Code Reviewer (2026-05-23): APPROVE. Surgical fix — 11 lines across 2
files. No isolation-contract change (foundations.md §9.1 holds; 1 real
`internal import GoogleMobileAds` in LiveAdMobBridge.swift).

Verification:
- iOS xcodebuild BUILD SUCCEEDED
- macOS xcodebuild BUILD SUCCEEDED (no #101 regression)
- AppMonetizationKit tests 87/87
- Isolation grep: 1 hit

§未決 routed to backlog
- v12.x upgrade follow-up → foundations.md §Backlog
- iOS xcodebuild not wired into Xcode Cloud PR workflow →
  methodology.md §Backlog

Co-Authored-By: Claude Opus 4.7 <[email protected]>
@wei18
wei18 merged commit 5534cf2 into main May 23, 2026
@wei18
wei18 deleted the fix/ios-mobileads-in-scope branch May 23, 2026 11:34
wei18 added a commit that referenced this pull request May 23, 2026
Resolves PR #103 §未決. AdMob SPM 11.13.0 → 13.4.0, UMP 2.x → 3.1.0.

v13/v3 ship Swift-native API renamed to "comply with Apple's Swift
design guidelines" (UMP 3.0.0 release notes). Revert PR #103's v11
ObjC bridge to native Swift:

LiveAdMobBridge.swift:
- GADMobileAds.sharedInstance() → MobileAds.shared
- start completion signature matches v13

UMPConsentPresenter.swift:
- UMPConsentInformation.sharedInstance → ConsentInformation.shared
- UMPRequestParameters → RequestParameters
- UMPConsentForm.loadAndPresentIfRequired → ConsentForm.loadAndPresentIfRequired

Package.swift: from: 13.0.0 (mobile-ads), from: 3.0.0 (UMP)

Verification:
- AppMonetizationKit swift test: 97/97 (no regression vs PR #108)
- iOS xcodebuild BUILD SUCCEEDED
- macOS xcodebuild BUILD SUCCEEDED (NoopAdProvider path unaffected)
- Isolation audit: 1 import GoogleMobileAds hit (LiveAdMobBridge.swift)
- .package.resolved + Package.resolved updated to 13.4.0 + 3.1.0

v13 deployment-target floor is iOS 13; we're on iOS 26 far above min.

Co-authored-by: Claude Opus 4.7 <[email protected]>
wei18 added a commit that referenced this pull request May 25, 2026
… v2.5 user-owned)

Plan.md was still tagged DRAFT/awaiting-v2.0-dispatch despite v2.0–v2.4
having fully shipped across ~15 PRs. Rewrite to align with code:

- Add §Status snapshot table (phase × status × PR refs, 75 @test count)
- Mark every step with [x]/[~]/[ ] + originating PR for traceability
- Add §Phase v2.4★ to backfill audit/polish work shipped after original
  plan (#97 #101 #102 #103 #106 #108 #109)
- Add steps v2.0.6 (anchor registry split) and v2.3.6.1
  (MonetizationStateController + ToastController)
- Correct existing step prose: StoreKitBridge symmetric split,
  RootView.init real 6-param signature with 4 optional slots,
  boot order via MonetizationBootCoordinator, AdMob isolation
  audit count = 2 files (protocol + live wrapper)
- Shrink §v2.5 to phase summary; defer detailed checklist to
  v2.5-readiness.md (single source of truth)
- Add §Decisions D-v2-01..06 capturing execution-phase decisions
  (AdMob v13/UMP v3, v11 ObjC API, macOS Noop, anchor registry,
  purchaseUpdates split, RootView optional slots)
- Add §下一動作 explicit user-owned next steps

340 → 275 lines.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
wei18 added a commit that referenced this pull request May 25, 2026
… v2.5 user-owned) (#130)

Plan.md was still tagged DRAFT/awaiting-v2.0-dispatch despite v2.0–v2.4
having fully shipped across ~15 PRs. Rewrite to align with code:

- Add §Status snapshot table (phase × status × PR refs, 75 @test count)
- Mark every step with [x]/[~]/[ ] + originating PR for traceability
- Add §Phase v2.4★ to backfill audit/polish work shipped after original
  plan (#97 #101 #102 #103 #106 #108 #109)
- Add steps v2.0.6 (anchor registry split) and v2.3.6.1
  (MonetizationStateController + ToastController)
- Correct existing step prose: StoreKitBridge symmetric split,
  RootView.init real 6-param signature with 4 optional slots,
  boot order via MonetizationBootCoordinator, AdMob isolation
  audit count = 2 files (protocol + live wrapper)
- Shrink §v2.5 to phase summary; defer detailed checklist to
  v2.5-readiness.md (single source of truth)
- Add §Decisions D-v2-01..06 capturing execution-phase decisions
  (AdMob v13/UMP v3, v11 ObjC API, macOS Noop, anchor registry,
  purchaseUpdates split, RootView optional slots)
- Add §下一動作 explicit user-owned next steps

340 → 275 lines.

Co-authored-by: Claude Opus 4.7 <[email protected]>
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.

fix(v2): iOS xcodebuild compile fails — 'MobileAds in scope' (pre-existing, blocks TestFlight)

1 participant