storekit
Skill0 starsChanged 2 months agoMITView on GitHub
Use when implementing in-app purchases, StoreKit 2 subscriptions, consumables, non-consumables, or transaction handling. Covers testing-first workflow with .storekit configuration, StoreManager architecture, and transaction verification.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- caglarbaranbora/Apple-Agent-Kittheir own version, first seen Oct 13, 2026
- thienqo/ios-skillstheir own version, first seen Oct 11, 2026
- Prisma-Labs-Dev/apple-skillstheir own version, first seen Apr 14, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- Prisma-Labs-Dev/apple-skills★ 336same name
- thienqo/ios-skills★ 4same name
- caglarbaranbora/Apple-Agent-Kit★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository21 other files it gives its agents.
- animateSkill
- composable-architectureSkill
- find-animation-opportunitiesSkill
- generating-swift-package-docsSkill
- hapticsSkill
- improve-animationsSkill
- ios-26-platformSkill
- ios-higSkill
- ios-simulator-skillSkill
- localizationSkill
- review-animationsSkill
- spm-build-analysisSkill
- swift-concurrencySkill
- swift-dataSkill
- swift-diagnosticsSkill
- swift-networkingSkill
- swift-styleSkill
- swift-testingSkill
- swiftuiSkill
- write-swiftSkill
- xcode-buildSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 24
Create .storekit configuration file first (before any code)
- Distinctive: line 25
Test purchases locally in Xcode simulator
- Very specific: line 29
Always call transaction.finish() after granting entitlements
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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.
| Reference | Load When |
| Getting Started | Setting up .storekit configuration file, testing-first workflow |
| Products | Loading products, product types, purchasing with Product.purchase() |
| Subscriptions | Auto-renewable subscriptions, subscription groups, offers, renewal tracking |
| Transactions | Transaction listener, verification, finishing transactions, restore purchases |
| StoreKit Views | ProductView, SubscriptionStoreView, SubscriptionOfferView in SwiftUI |
Core Workflow
- Create
.storekitconfiguration file first (before any code) - Test purchases locally in Xcode simulator
- Implement centralized
StoreManagerwith@MainActor - Set up
Transaction.updateslistener at app launch - Display products with
ProductViewor custom UI - 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
- Missing
.finish()calls on transactions — Forgetting to calltransaction.finish()after granting entitlements causes transactions to never complete. The user won't see their purchase reflected. Always callfinish(). - Unsafe StoreManager state — Shared
StoreManagerwithout@MainActorcan have race conditions. Multiple async tasks can update@Publishedproperties concurrently, corrupting state. Use@MainActorfor thread safety. - No transaction listener at app launch — Not setting up
Transaction.updateslistener means app crashes or misses refunded/canceled purchases. Listen for transactions immediately in@main, not when user taps purchase button. - 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).
- Ignoring verification failures — App Store verification fails silently sometimes. Not checking verification status means accepting unverified transactions (security risk). Always verify before granting entitlements.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

