Delivery of auto-renewing subscriptions for iOS

前端 未结 1 1137
北荒
北荒 2021-02-11 09:42

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 w

相关标签:
1条回答
  • 2021-02-11 09:56

    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:

    • Marco Arment's piece on The limited world of auto-renewable subscriptions, and
    • The Comments on this SO Question: Auto-renewing subscription – Differences to non-renewing subscription

    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.

    0 讨论(0)
提交回复
热议问题