How to detect when auto-renewing subscription expires?

Hi all,

I've implemented in-app purchases to have auto-renewing subscriptions. However, when I use Xcode's Transaction Manager to expire a subscription, there seems to be no callback Transaction.updates or Transaction.currentEntitlements I can see an expiry through Transaction.all but I can't imagine the intention is to poll that while the app is running.

What am I missing here?

Replies

I think you need this:

https://developer.apple.com/documentation/storekit/product/subscriptioninfo/status/3851115-updates

Get that async sequence for your subscription group using this:

https://developer.apple.com/documentation/storekit/product/subscriptioninfo/3822297-status

I think you get an update when it expires. Please let me know if you get this to work, I will need to implement something like this soon.

  • Your first suggestion is the one I expected as well , but for an expiry, there is no update.

    Your second suggestion works, but then I would have to poll this as my app runs.

    I’m lookingnfor a realtime callback, so that when expiry occurs while the app is running, I can update the ui to reflect that.

Add a Comment