1
votes

I have product with Non-Renewing Subscription type and I need functionality to restore transactions user previously made. I purchase several such products and want to restore them. I use this typical code:

[[SKPaymentQueue defaultQueue] addTransactionObserver:self];
[[SKPaymentQueue defaultQueue] restoreCompletedTransactions];

But I get paymentQueueRestoreCompletedTransactionsFinished: without any restored transaction. I use sandbox environment with test users.

1

1 Answers

3
votes

Non-renewing subscriptions are not restored by the iTunes app store. It is your app's responsibility to track the user's subscription state -

From the In-App Purchase Programming Guide

Non-renewing subscriptions differ from auto-renewable subscriptions in a few key ways. These differences give your app the flexibility to implement the correct behavior for your needs, as follows:

Your app is responsible for calculating the time period that the subscription is active and determining what content needs to be made available to the user. Your app is responsible for detecting that a subscription is approaching its expiration date and prompting the user to renew the subscription by purchasing the product again.

Your app is responsible for making subscriptions available across all the user’s devices after they’re purchased and for letting users restore past purchases. For example, most subscriptions are provided by a server; your server would need some mechanism to identify users and associate subscription purchases with the user who purchased them.