Releases: jaywcjlove/StoreKitHelper
Releases · jaywcjlove/StoreKitHelper
v2.5.0
Full Changelog: v2.4.0...v2.5.0
The default purchase call remains unchanged:
await store.purchase(product)If you need StoreKit purchase options, you can now pass them through directly:
await store.purchase(product, options: [
.appAccountToken(appAccountToken)
])v2.4.0
StoreContext exposes a tri-state purchase status. At app launch, purchaseStatus starts as .loading until Transaction.currentEntitlements finishes its first sync. During this stage, hasPurchased and hasNotPurchased both return false, so startup code will not accidentally treat the user as "not purchased".
switch store.purchaseStatus {
case .loading:
// Purchase state is still being resolved
case .purchased:
// ✅ User has active purchases
case .notPurchased:
// 🧾 User has no active purchases
}Recommended usage:
@EnvironmentObject var store: StoreContext
var body: some View {
switch store.purchaseStatus {
case .loading:
ProgressView("Checking purchases...")
case .purchased:
// ✅ User has purchased - show full functionality
case .notPurchased:
// 🧾 User hasn't purchased - show limited content or purchase prompt
}
}Compatible legacy usage:
@EnvironmentObject var store: StoreContext
var body: some View {
if store.hasResolvedPurchaseStatus == false {
ProgressView("Checking purchases...")
} else if store.hasNotPurchased == true {
// 🧾 User hasn't purchased - show limited content or purchase prompt
} else if store.hasPurchased == true {
// ✅ User has purchased - show full functionality
}
}v2.3.3
Full Changelog: v2.3.2...v2.3.3
v2.3.2
Full Changelog: v2.3.1...v2.3.2
v2.3.1
Full Changelog: v2.3.0...v2.3.1
v2.3.0
Full Changelog: v2.2.0...v2.3.0
v2.2.0
Full Changelog: v2.1.2...v2.2.0
v2.1.2
Full Changelog: v2.1.1...v2.1.2
v2.1.1
Full Changelog: v2.1.0...v2.1.1
v2.1.0
Full Changelog: v2.0.0...v2.1.0