All skills
dpearson2699 avatar

/storekit

@cf3fe87

Implement, review, or improve in-app purchases and subscriptions using StoreKit 2. Use when building paywalls with SubscriptionStoreView or ProductView, processing transactions with Product and Transaction APIs, verifying entitlements, handling purchase flows (consumable, non-consumable, auto-renewable), implementing offer codes or promotional/win-back/introductory offers, managing subscription status and renewal state, setting up StoreKit testing with configuration files, or integrating Family Sharing, Ask to Buy, refund handling, and billing retry logic.

Use this Skill: https://skilld.dev/gh/dpearson2699/swift-ios-skills/storekit

This session only. Nothing lands on disk.

referencesapp-review-guidelines.md

≈1.4k tokens on demand. Your agent reads this file only when SKILL.md points to it.

App Review Guidelines -- In-App Purchases and Subscriptions

Use this as a StoreKit implementation guardrail for App Review payment issues. For full submission, privacy, metadata, entitlement, or rejection-risk audits, use the sibling app-store-review skill and re-check Apple's current App Review Guidelines.

Contents

Guideline 3.1.1 Baseline

Digital content, app features, subscriptions, virtual goods, and services unlocked in the app generally must use Apple's In-App Purchase system unless a specific App Review guideline exception, storefront-specific rule, or approved entitlement applies.

Do not present this as a universal ban on every external purchase link. The rules differ by storefront, entitlement, and app type, and they change over time. For a release audit, quote the current guidelines directly.

What Generally Requires IAP

  • Premium features or content unlocks
  • Subscriptions to app functionality
  • Virtual currency, coins, gems, or other digital goods
  • Ad removal
  • Digital tips or donations
  • Digital gift cards, certificates, vouchers, or coupons for digital goods

What Generally Does Not Require IAP

  • Physical products and e-commerce
  • Ride-sharing, food delivery, and real-world services
  • One-to-one services such as tutoring or consulting booked through the app
  • Enterprise or B2B apps distributed through Apple Business Manager

External Purchase Links and Reader Apps

  • Remove external purchase links, buttons, calls to action, and purchase paths for digital goods unless the current storefront rules or an approved entitlement explicitly allow them.
  • Reader apps may access content purchased elsewhere. Account-management or sign-up links depend on current reader-app rules, storefront, and entitlement status.
  • U.S. storefront behavior and some regional external-purchase entitlements are different from the old blanket prohibition. Do not hardcode old guidance into product or review advice.

Subscription Display Requirements

  • Clearly display price, duration, billing frequency, renewal behavior, and cancellation terms before purchase.
  • Free trials must clearly state trial duration, post-trial price, billing frequency, auto-renewal, and cancellation terms.
  • Subscriptions should provide ongoing value and be available across a user's devices where the app supports them.

StoreKit Implementation Checklist

  • Categorize consumables, non-consumables, non-renewing subscriptions, and auto-renewable subscriptions correctly in App Store Connect.
  • Provide working restore purchases for restorable products. StoreKit views can expose this with .storeButton(.visible, for: .restorePurchases).
  • Verify transactions with StoreKit 2 VerificationResult, current entitlements, and server-side JWS validation when the business model requires server authority.
  • Handle interrupted purchases, .pending Ask to Buy approvals, refunds, revocations, Family Sharing changes, grace period, and billing retry.

Common IAP Rejection Risks

  1. Unauthorized external purchase path. The app links or directs users to buy digital goods outside IAP without a current rule or entitlement allowing that path.
  2. Missing restore path. Restorable products cannot be restored from the paywall or store surface.
  3. Unclear subscription terms. Price, duration, renewal behavior, trial conversion price, and cancellation terms are missing or hidden before purchase.
  4. Incorrect product categorization. Consumables, non-consumables, and auto-renewable subscriptions do not match the App Store Connect product setup or the app's entitlement logic.

Pre-Submission Payments Checklist

  • Digital goods and app-unlocked features use IAP unless a current exception or approved entitlement applies
  • Subscription terms are visible before purchase
  • Free trial copy states post-trial price and billing frequency
  • External purchase links and CTAs are either removed or justified by a current storefront rule or approved entitlement
  • Restore purchases path is visible and functional for restorable products
  • Product types match App Store Connect configuration
  • Transaction verification uses StoreKit 2 APIs and server validation where needed
  • Ask to Buy, deferred approvals, refunds, and revocations are handled

References

Source: SKILL.md on GitHub

No alerts16d4 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    This skill provides comprehensive documentation and Swift code examples for implementing StoreKit 2 in iOS applications. It includes best practices for transaction verification, entitlement management, and subscription handling. No malicious patterns, such as prompt injection, data exfiltration, or obfuscation, were detected.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at cf3fe87. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Steadyupdated 3 months ago
  • storekit
  • in-app-purchases
  • subscriptions
  • ios
  • swift
  • paywalls
  • transactions
  • swiftui

README badge

README badge for dpearson2699/swift-ios-skills/storekit

Implement in-app purchases, subscriptions, and paywalls using StoreKit 2 on iOS 16+ with the modern Product, Transaction, and SubscriptionStoreView APIs. Covers product loading, purchase flows, entitlement checking, subscription status, offer codes, Family Sharing, Ask to Buy, refund handling, and StoreKit testing configuration.

Generated from the current SKILL.md.

Does this skill cover both StoreKit 1 and StoreKit 2?
No. This skill focuses exclusively on StoreKit 2 and modern APIs (Product, Transaction, SubscriptionStoreView). It explicitly avoids the older original StoreKit APIs (SKProduct, SKPaymentQueue, SKStoreReviewController).
What iOS versions does this support?
StoreKit 2 requires iOS 15.1+. SubscriptionStoreView and StoreView require iOS 17+. App Transaction verification requires iOS 16+.
Does this cover refund handling and billing retry logic?
Yes. The skill covers checking revocationDate to detect refunds, renewal states including inBillingRetryPeriod and inGracePeriod for failed payments, and App Transaction verification for detecting tampered installations.
How do I handle purchases made on other devices or Family Sharing?
Start a Transaction.updates listener at app launch—it automatically catches purchases from other devices, Family Sharing changes, renewals, refunds, and Ask to Buy approvals.
Does this skill cover consumable products?
Yes. The skill covers consumable products (purchased once, can be repurchased), non-consumable products, auto-renewable subscriptions, and non-renewing subscriptions, including quantity options for consumables.

Generated from the current SKILL.md. These answers refresh after source changes.