Post

Replies

Boosts

Views

Activity

Reply to Is subscription autoRenewStatus in StoreKit2 working correctly with Sandbox testing?
This state miss-match appears to be a result of StoreKit2 cacheing subscription info in a local database at: ../app_container/Library/Caches/StoreKit/receipts.db. I was able to improve my flow by doing the following after displaying the manage subscriptions sheet. Clear the caches directory Fetch either the entitlement via Transaction.currentEntitlements or refresh a specific subscription group via Product.SubscriptionInfo.status(for:). Example cache clear: public func clearStoreKitReceiptsCache() throws { let fileManger = FileManager.default guard let cachesDir = fileManger.urls(for: .cachesDirectory, in: .userDomainMask).first else { return } guard let storeKitPath = try fileManger.contentsOfDirectory( at: cachesDir, includingPropertiesForKeys: nil, options: []).first(where: { $0.lastPathComponent == "StoreKit" }) else { return } try fileManger.removeItem(at: storeKitPath) }
Topic: App & System Services SubTopic: StoreKit Tags:
Feb ’22
Reply to Is subscription autoRenewStatus in StoreKit2 working correctly with Sandbox testing?
+1 on this issue and I'm also seeing very erratic behavior on these status changes. Similarly, shouldn't a change in auto-renew status trigger a change via the subscription info's status updates stream? static var updates: Product.SubscriptionInfo.Status.Statuses { get } (https://developer.apple.com/documentation/storekit/product/subscriptioninfo/status/3851115-updates) @eskimo wondered if you could weigh in on this status change for auto-renew? Thanks in advance.
Topic: App & System Services SubTopic: StoreKit Tags:
Jan ’22
Reply to StoreKit 2 - latest transaction for a subscription is not the latest one at launch when app is not running
I suspect this too could be related to incorrect cache assumptions made by StoreKit2. https://developer.apple.com/forums/thread/690890?answerId=705952022#705952022
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Feb ’22
Reply to Subscription state not update if I subscribe in App Store sandbox instead of my app
Subscription status updates will come in via Product.SubscriptionInfo.Status.updates instead of Transaction.updates. Creating a task to observe those updates will help with your issue.
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Feb ’22
Reply to Is subscription autoRenewStatus in StoreKit2 working correctly with Sandbox testing?
This state miss-match appears to be a result of StoreKit2 cacheing subscription info in a local database at: ../app_container/Library/Caches/StoreKit/receipts.db. I was able to improve my flow by doing the following after displaying the manage subscriptions sheet. Clear the caches directory Fetch either the entitlement via Transaction.currentEntitlements or refresh a specific subscription group via Product.SubscriptionInfo.status(for:). Example cache clear: public func clearStoreKitReceiptsCache() throws { let fileManger = FileManager.default guard let cachesDir = fileManger.urls(for: .cachesDirectory, in: .userDomainMask).first else { return } guard let storeKitPath = try fileManger.contentsOfDirectory( at: cachesDir, includingPropertiesForKeys: nil, options: []).first(where: { $0.lastPathComponent == "StoreKit" }) else { return } try fileManger.removeItem(at: storeKitPath) }
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Feb ’22
Reply to Is subscription autoRenewStatus in StoreKit2 working correctly with Sandbox testing?
+1 on this issue and I'm also seeing very erratic behavior on these status changes. Similarly, shouldn't a change in auto-renew status trigger a change via the subscription info's status updates stream? static var updates: Product.SubscriptionInfo.Status.Statuses { get } (https://developer.apple.com/documentation/storekit/product/subscriptioninfo/status/3851115-updates) @eskimo wondered if you could weigh in on this status change for auto-renew? Thanks in advance.
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Jan ’22
Reply to "“Test Apple Root CA - G3” certificate is not trusted" when verifying renewal info
I'm also seeing this issue so just +1ing the issue. Also curious if there is a technical reason why promotional offers are not signed/validated automatically by StoreKit2 the same way purchases can now be signed by the framework itself? Thanks
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Sep ’21