← ClaudeAtlas

storekit2-iap-defaultslisted

Default StoreKit 2 architecture for a single non-consumable IAP (Remove Ads, Pro Unlock): `StoreKitBridge` isolates `import StoreKit` to one Live file; launch-time `Transaction.updates`; `Transaction.currentEntitlements` for unlock state; `finish()` timing; `AppStore.sync()` restore; `.storekit` + Fake-bridge test seam. Invoke when adding IAP, wiring StoreKit 2, or asked "how do I unlock a purchase / restore purchases / test IAP". Does NOT cover subscriptions or ad SDKs.
wei18/apple-dev-skills · ★ 19 · AI & Automation · score 78
Install: claude install-skill wei18/apple-dev-skills
# StoreKit 2 IAP Defaults Default shape for the smallest IAP most solo/small apps ship: one non-consumable unlock (Remove Ads, Pro Unlock). `Product`, `Transaction`, and `AppStore` have no public initializers — you cannot construct a fixture — so the seam below exists to make StoreKit 2 testable at all, not for abstraction's sake. ## When to invoke - Adding a first non-consumable IAP to a new or existing app. - Wiring `Product.products(for:)`, `Transaction.updates`, `Transaction.currentEntitlements`, or `AppStore.sync()`. - Deciding where entitlement state lives, when to call `finish()`, or how to implement Restore Purchases. - Setting up a `.storekit` configuration file or a StoreKit unit-test seam. - Asked "how do I test a purchase without a sandbox account" or "why isn't my unlock surviving reinstall". ## Scope Owns: bridge/seam shape, entitlement-derivation rules, test strategy for **non-consumable IAP**. Does NOT own: - Subscriptions/consumables — different renewal semantics; this skill's `currentEntitlements()` shape is deliberately "own it or don't." - Ad SDK isolation — same bridge-protocol *pattern*, different domain → `monetization-sdk-integration`. - What App Review requires of Restore Purchases / IAP pricing clarity (3.1.1) → `app-store-review-rejections`. - Creating the IAP product in App Store Connect — the ASC API 2.0 has `POST /v2/inAppPurchases` plus `inAppPurchaseLocalizations`, `inAppPurchasePriceSchedules`, and `inAppPurchaseSubmissio