Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
johnrogers avatar

Storekit

  • 143 installs
  • 222 repo stars
  • Updated January 18, 2026
  • johnrogers/claude-swift-engineering

Add StoreKit 2 in-app purchases, auto-renewable subscriptions, transaction handling, and receipt validation to monetize Apple apps.

About

Provides expert guidance for implementing Apple StoreKit in Swift apps, including in-app purchases, auto-renewable subscriptions, transaction handling, entitlements, and App Store monetization workflows.

  • In-app purchases
  • Subscriptions
  • StoreKit 2
  • Receipt validation
  • Transaction handling

Storekit by the numbers

  • 143 all-time installs (skills.sh)
  • +3 installs in the week ending Aug 2, 2026 (Skillselion tracking)
  • Ranked #532 of 1,039 Mobile Development skills by installs in the Skillselion catalog
  • Data as of Aug 2, 2026 (Skillselion catalog sync)
npx skills add https://github.com/johnrogers/claude-swift-engineering --skill storekit

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs143
repo stars222
Last updatedJanuary 18, 2026
Repositoryjohnrogers/claude-swift-engineering

What it does

Add StoreKit 2 in-app purchases, auto-renewable subscriptions, transaction handling, and receipt validation to monetize Apple apps.

Files

SKILL.mdMarkdownGitHub ↗

StoreKit

StoreKit 2 patterns for implementing in-app purchases with async/await APIs, automatic verification, and SwiftUI integration.

Reference Loading Guide

ALWAYS load reference files if there is even a small chance the content may be required. It's better to have the context than to miss a pattern or make a mistake.

ReferenceLoad When
[Getting Started](references/getting-started.md)Setting up .storekit configuration file, testing-first workflow
[Products](references/products.md)Loading products, product types, purchasing with Product.purchase()
[Subscriptions](references/subscriptions.md)Auto-renewable subscriptions, subscription groups, offers, renewal tracking
[Transactions](references/transactions.md)Transaction listener, verification, finishing transactions, restore purchases
[StoreKit Views](references/storekit-views.md)ProductView, SubscriptionStoreView, SubscriptionOfferView in SwiftUI

Core Workflow

1. Create .storekit configuration file first (before any code) 2. Test purchases locally in Xcode simulator 3. Implement centralized StoreManager with @MainActor 4. Set up Transaction.updates listener at app launch 5. Display products with ProductView or custom UI 6. Always call transaction.finish() after granting entitlements

Essential Architecture

@MainActor
final class StoreManager: ObservableObject {
    @Published private(set) var products: [Product] = []
    @Published private(set) var purchasedProductIDs: Set<String> = []
    private var transactionListener: Task<Void, Never>?

    init() {
        transactionListener = listenForTransactions()
        Task { await loadProducts() }
    }
}

Common Mistakes

1. Missing `.finish()` calls on transactions — Forgetting to call transaction.finish() after granting entitlements causes transactions to never complete. The user won't see their purchase reflected. Always call finish().

2. Unsafe StoreManager state — Shared StoreManager without @MainActor can have race conditions. Multiple async tasks can update @Published properties concurrently, corrupting state. Use @MainActor for thread safety.

3. No transaction listener at app launch — Not setting up Transaction.updates listener means app crashes or misses refunded/canceled purchases. Listen for transactions immediately in @main, not when user taps purchase button.

4. Hardcoded product IDs — Hardcoded IDs make testing and localization hard. Use configuration files or environment variables for product IDs. Same applies to prices (fetch from App Store, don't hardcode).

5. Ignoring verification failures — App Store verification fails silently sometimes. Not checking verification status means accepting unverified transactions (security risk). Always verify before granting entitlements.

Related skills

Mobile Developmentpaymentspricing

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.