storekit

Implement StoreKit 2 in-app purchases and subscriptions for iOS 26+.

1|1|Updated Apr 11, 2026
One-click install
npx skills add https://github.com/Borisserz/FoodTracker --skill storekit-borisserz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: storekit
Source: https://github.com/Borisserz/FoodTracker/tree/main/.agents/skills/storekit
Command: npx skills add https://github.com/Borisserz/FoodTracker --skill storekit-borisserz

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

StoreKit 2 in-app purchases and subscriptions enable modern monetization flows in iOS apps, but implementing, testing, and validating entitlements can be complex without a structured pattern.

Core Features & Use Cases

  • Load and present products using StoreView, SubscriptionStoreView, or PurchaseAction
  • Manage purchases, entitlement validation with Transaction.currentEntitlements, and restore purchases
  • Support advanced flows like Ask to Buy, refunds, revocations, and promotional offers in production-grade apps

Quick Start

Configure StoreKit 2 paywalls by wiring SubscriptionStoreView and StoreView in your SwiftUI app and run a StoreKit testing session to validate entitlements.

Frequently Asked Questions about storekit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement StoreKit 2 in-app purchases and subscriptions in SwiftUI?

Implement StoreKit 2 in-app purchases by loading products with StoreView or SubscriptionStoreView, handling entitlements via Transaction.currentEntitlements, and finishing transactions only after durable delivery. Launch a Transaction.updates listener at app startup to process purchases, refunds, and revocations.

Why do I need a Transaction.updates listener for StoreKit 2 subscriptions?

A Transaction.updates listener is needed for StoreKit 2 subscriptions to handle asynchronous purchase events like Ask to Buy, refunds, and revocation at app startup. It validates and applies Transaction.currentEntitlements to ensure entitlements remain accurate without manual polling.

What's the best way to restore purchases and validate entitlements with StoreKit 2?

The best way to restore purchases and validate entitlements with StoreKit 2 is by iterating through Transaction.currentEntitlements. This automatically verifies active subscriptions and non-consumable purchases, allowing you to grant access immediately without requiring a separate restore button action.

When should I finish a StoreKit 2 transaction during the purchase flow?

You should finish a StoreKit 2 transaction only after durable delivery of the purchased content or entitlement. Finishing transactions prematurely removes them from the payment queue, risking lost access if the app crashes before the purchased entitlement is securely stored.

Can I test Ask to Buy, refunds, and revocation flows for StoreKit 2 IAPs?

Yes, you can test Ask to Buy, refunds, and revocation flows for StoreKit 2 IAPs by running a StoreKit testing session in Xcode. This allows you to validate how your app handles delayed purchases, approved family purchases, and revoked entitlements locally.

Does StoreKit 2 require iOS 26+ for SubscriptionStoreView and PurchaseAction?

Yes, StoreKit 2 implementations using SubscriptionStoreView and PurchaseAction require iOS 26+. These modern SwiftUI components handle loading products and managing purchases natively, replacing older StoreKit 1 APIs for subscription and in-app purchase workflows.