1

I am finding that the renewal of an expired auto-renewing subscription is never being delivered while the application is active and running, but rather when the application is woken up from background or on launch.

In other words if you are using the app, and the subscription expires, it won't be delivered to the app (assuming it is auto-renewing and valid etc) while the user continues to use the app.

This behaviour does not seem to be documented by Apple, can anyone else with experience of this confirm or otherwise?

Obviously one can detect that the sub has expired and then offer the user the chance to check their subscription status and restoreCompletedTransactions which will pull in the new subscription - but I'm just wondering if we're doing something wrong, or if this behaviour is normal.

Thanks.

Roger
  • 15,793
  • 4
  • 51
  • 73

1 Answers1

5

Yes. That's what I experienced as well. Before I continue, please see the following posts on why you might want to stay away from auto-renewing subscriptions:

When your app becomes active, that does seem to trigger the App Store to send any new auto-renewing subscription receipts to your app. But you shouldn't rely on that. And, you don't have to restoreCompletedTransactions to get the latest receipts.

You can see another one of my answers for more detail on this subject. What you should be doing (based on Apple's documentation and some experimentation) is storing receipts on your server. Then when you want to check if a person's subscription has been auto-renewed, follow Apples procedure for verifying one of those receipts with iTunes. Apple will respond with info about that receipt as well as the latest receipt in that subscription. If it's different than the one you sent, then you know an auto-renewal has occured.

Community
  • 1
  • 1
Andrew
  • 8,363
  • 8
  • 43
  • 71
  • Andrew how about the case where I do not have a server, and instead my application sends the app receipt straight to apple to receive the updated in-app subscription receipt... Just to see if the user hasn't canceled the subscription. – MiMo Jul 17 '14 at 14:55
  • 1
    @MiMo In that case, in your app, I would wait for expiration date/time to pass and then send a verification to Apple and see if it responds with a new receipt. If it does then you can extend the use of the added features to the user. If it doesn't, then the user has cancelled their subscription at some point during the last period. There isn't a way to tell if a user has cancelled a subscription until their current period ends and a new receipt either appears or doesn't. The user may have turned of Auto-Renewal but their current cycle will still complete. – Andrew Jul 20 '14 at 17:52
  • Thanks @Andrew thats what I am actually doing, sometimes I am actually receiving receipts that have expiration dates that are before the purchase date. Every time you send a receipt do you get it from `[[NSBundle mainBundle] appStoreReceiptURL];` or do you get it from there once, store in NSUserDefaults and just use NSUserdaults data to query for the apple receipt next time? – MiMo Jul 21 '14 at 15:01
  • Actually @MiMo, since I verify from my server I used a fixed URL provided in the docs so I'm not sure of the procedure when verifying from the device. – Andrew Jul 23 '14 at 01:45