Repository navigation
feat(v2): IAP impl with StoreKit 2 — Phase v2.1 - #59
Merged
Merged
Conversation
Phase v2.1 complete. LiveStoreKit2IAPClient + StoreKitBridge seam + Purchase flow + Restore + Transaction observer. 22 new tests, 57 total. - LiveStoreKit2IAPClient (113 lines, public actor): availableProducts, purchase, restorePurchases, purchaseUpdates AsyncStream - StoreKitBridge protocol seam (lifted from v2.1.2 → v2.1.1 because StoreKit.Product has no public init; testing requires the bridge) - LiveStoreKitBridge adapter — only file importing StoreKit - IAPProductMapper pure function (independently testable) - IAPProductIDs.removeAds = com.wei18.sudoku.iap.remove_ads - FakeStoreKitBridge with scripting + counters v2.0 inherited §未決 #2 (recordRefund()) RESOLVED at v2.1's scope: purchaseUpdates() correctly emits .revoked from Transaction.updates events with non-nil revocationDate. AdGate wiring still deferred to v2.3 as planned. New §未決 (non-blocking): - Empty products(for:) behavior on ASC catalog drift (returns [], not throws) - @unknown default on Product.PurchaseResult (silent SDK forward-compat) - Task.detached priority .background on observer (may want .utility v2.3) Isolation audit: import StoreKit only in LiveStoreKitBridge.swift (1 hit, internal import). MonetizationCore StoreKit-free. Package.swift not modified. Build clean, 57/57 tests in 10 suites, TODO sweep 0 hits. impl-notes: meetings/2026-05-21_v2.1-iap-storekit2.impl-notes.md
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.
Phase v2.1 of docs/v2/plan.md — 2 steps.
LiveStoreKit2IAPClient + StoreKitBridge protocol seam + purchase/restore/observer. 22 new tests (57 total). v2.0 inherited §未決 #2 (recordRefund) resolved at v2.1's scope (.revoked event emits correctly; AdGate wiring still v2.3).
Isolation:
import StoreKitonly in LiveStoreKitBridge.swift. Build clean, 57/57 tests, TODO sweep 0 hits.🤖 Claude Code