SwiftyStoreKit icon indicating copy to clipboard operation
SwiftyStoreKit copied to clipboard

Should localReceiptData be updated when a Subscription auto renews?

Open chamitha opened this issue 4 years ago • 4 comments

Question

I am testing auto-renewing subscriptions in the Sandbox and have noticed that my SwiftyStoreKit.completeTransactions completion handler in AppDelegate is invoked with a purchased state as expected when a subscription auto renews BUT subsequently the SwiftyStoreKit.localReceiptData property seems to not have been updated as SwiftyStoreKit.verifySubscription returns a status of expired with the old subscription expiry date. Is this expected? Of course if I were to refresh the receipt (using either fetchReceipt or verifyReceipt with forceRefresh) the latest (renewed and active) subscription is received.

chamitha avatar Dec 15 '20 02:12 chamitha

Hey, have you managed to find a way there? Was this resolved? Is simply calling fetchReceipt each time this happens a solution?

Reiszecke avatar Oct 09 '21 09:10 Reiszecke

Hey, have you managed to find a way there? Was this resolved? Is simply calling fetchReceipt each time this happens a solution?

@Reiszecke Yes, I did end up calling fetchReceipt(forceRefresh: true)

chamitha avatar Oct 16 '21 01:10 chamitha

@chamitha thank you for responding. If you can take 3 more minutes of your spare time:

  • do you get prompted an AppleID-signin when doing that?

  • merchantkit takes into account 30 days of App Store delay with the receipts - do you also experience that issue?

  • my users suffer from https://github.com/bizz84/SwiftyStoreKit/issues/587 in production; is that also an issue in your app?

Reiszecke avatar Oct 16 '21 09:10 Reiszecke

@Reiszecke

  • do you get prompted an AppleID-signin when doing that?

Yes, fetchReceipt(forceRefresh: true) will prompt for sign-in if not already done so. But I don't thinkSwiftyStoreKit.completeTransactions is called when not signed-in? In which case no one will be prompted.

  • merchantkit takes into account 30 days of App Store delay with the receipts - do you also experience that issue?

I haven't used merchantkit.

I can't say for sure. I have since migrated to manage in app purchases server side so these issues have dropped off my radar. Sorry I can't be of more help 😞

chamitha avatar Oct 16 '21 10:10 chamitha