Implement in-app purchases, subscriptions, and paywalls using StoreKit 2 on iOS 26+. Use only the modern Product, Transaction, StoreView, and SubscriptionStoreView APIs. Never use the deprecated original StoreKit (SKProduct, SKPaymentQueue, SKStoreReviewController).
| Consumable | .consumable | Used once, can be repurchased (gems, coins) | | Non-consumable | .nonConsumable | Purchased once permanently (premium unlock) | | Auto-renewable | .autoRenewable | Recurring billing with automatic renewal | | Non-renewing | .nonRenewing | Time-limited access without automatic renewal |
Define product IDs as constants. Fetch products with Product.products(for:).
StoreKit 2を使用して、アプリ内購入とサブスクリプションを実装、レビュー、または改善します。SubscriptionStoreViewまたはProductViewを使用したペイウォールの構築、製品およびトランザクションAPIを使用したトランザクションの処理、資格の検証、購入フローの処理(消耗品、非消耗品、自動更新可能)、オファーコードまたはプロモーション/ウィンバック/紹介オファーの実装、サブスクリプションステータスと更新状態の管理、構成ファイルを使用したStoreKitテストのセットアップ、またはファミリーの統合に使用します。共有、購入依頼、返金処理、請求の再試行ロジック。 ソース: dpearson2699/swift-ios-skills。