Repository navigation
feat(v2): conditional AdMob/UMP deps + NoopAdProvider for macOS build - #101
Merged
Merged
Conversation
Fixes macOS build failure (12+ link errors on missing macOS slice in GoogleMobileAds.xcframework + UserMessagingPlatform.xcframework). Changes: - Packages/AppMonetizationKit/Package.swift: AdsAdMob target's GoogleMobileAds + GoogleUserMessagingPlatform product deps gated with .condition(.when(platforms: [.iOS])). UMP declared directly (not transitive) so the platform condition attaches. - NEW MonetizationCore/NoopAdProvider.swift (~37 lines): production fallback AdProvider for macOS (where AdMob doesn't exist). actor; init/refreshBanner no-ops; bannerStatus = .suppressed (BannerSlotView already collapses to EmptyView for .suppressed → zero downstream changes needed). - AppComposition/Live.swift: #if os(iOS) for LiveAdMobAdProvider vs NoopAdProvider on macOS. - CompositionTests: platform-conditional expectation. Code Reviewer (2026-05-22): APPROVE. macOS BUILD SUCCEEDED verified locally. Per foundations.md §9.1 isolation contract holds — only AdsAdMob has the GoogleMobileAds product, and that product is now empty on macOS link. §未決 deferred to follow-up - bootMonetization() still calls UMP+ATT on macOS via canImport guards → 2 telemetry breadcrumbs per launch; consider early-return on !iOS - iOS xcodebuild compile fails on pre-existing 'MobileAds in scope' error — orthogonal pre-existing bug, separate issue to be filed Co-Authored-By: Claude Opus 4.7 <[email protected]>
wei18
added a commit
that referenced
this pull request
May 23, 2026
) (#103) 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
added a commit
that referenced
this pull request
May 23, 2026
…106) UMP + ATT bridges are iOS-only via canImport guards. On macOS bootMonetization() called them anyway, routing .unsupported outcomes through Telemetry.errorOccurred → 2 spurious breadcrumbs per launch. Add #if !os(iOS) { return } early-return. iOS path unchanged. Verification: swift test --filter "BootOrder|Composition" 20/20 pass (incl. new test using RecordingSink to assert events.isEmpty). 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]>
4 tasks
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]>
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.
Fixes macOS build (link errors on missing macOS slice in AdMob/UMP xcframeworks).
Changes
Code Reviewer APPROVE. macOS BUILD SUCCEEDED verified locally.
§未決 (follow-up issues to file)