StoreKit 2: is there a way for an app to be informed in real time if an auto-renewable subscription is cancelled by the user?

Hello,

In my iOS app, I have a customer center where the user can see some details about its current subscription. I display things like the billing period, the price, the introductory offer state, the renewal date if it's not cancelled or the expiration date if it's cancelled, etc. From this screen, the user can open the subscription management sheet.

I want to detect if the user cancels the subscription from this sheet or from the App Store (when the app is running) so I can refresh the information displayed on my customer center.

I checked the asynchronous sequences provided by StoreKit 2 like Transaction.updates or Product.SubscriptionInfo.Status.updates and tested with a Sandbox account on my physical device with the app debugged using Xcode. But I noticed these sequences don't emit when I cancel the subscription in Sandbox.

  1. Is this the expected behavior?
  2. Is there a way to observe in real time if a user cancels the subscription?

I can still manually check when the sheet is dismissed but it's not ideal because I want to know even if the user cancel from outside of the app with the app running.

Thank you, Axel

Hello,

I think it's expected that Transaction.updates is not called (because when a user cancels its subscription, there is actually no new transaction to be pushed to the devices) but I expect Product.SubscriptionInfo.Status.updates to be called (also when a user changes plan from monthly to yearly for example, so we can be informed about the renewal product). This Status.update async sequence is called when I test with Xcode testing (with a configuration file). But this behaviour seems to be different in the Sandbox environment (or it's very very slow to update?).

Before publishing the app, I want to be sure my flow is working but having two different behaviours between the Sandbox and the Xcode testing is not helping.

Thank you, Axel

StoreKit 2: is there a way for an app to be informed in real time if an auto-renewable subscription is cancelled by the user?
 
 
Q