开发者

When to use restoreCompletedTransactions in Auto-renewable Subscriptions?

my question is: If a subscription receipt expired, do i have to call [[SKPaymentQueue defaultQueue] restoreCompletedTransactions]?

Background: In sandbox, i dont get a new receipt automatically, so i think i have to use restoreCompletedTransactions. But in this way, the user has to enter his password every week,开发者_运维技巧 bad user experience.

And if the user has turned of the subscription, it has expired and starts the app again. The popup has to appear?


The way to handle this is to store any or all receipts your receive that pertain to the subscription. Then when you occasionally verify one of these receipts with Apple, they will send you the latest pertinent receipt which will tell you the status of the user's subscription. This process doesn't require the user to enter their credentials.

Note: Apple prefers that you perform verification from your server, and not from the app, so that you can keep your secret private and not include it in your app's code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜