0

I'm trying to restore user's purchases and re-enable an auto-renewable feature in the app; however it seems that whenever I am calling this function

[[SKPaymentQueue defaultQueue] restoreCompletedTransactions];

for some reason I get a list of all the transactions I've made and this functions is called as many as the number of transactions in the queue (not sure why)

- (void)restoreTransaction:(SKPaymentTransaction *)transaction
{
    [self recordTransaction:transaction.originalTransaction];
    [self provideContent:transaction.originalTransaction.payment.productIdentifier];
    [self finishTransaction:transaction wasSuccessful:YES];
}

which causes the app to re-enable the pro feature for many times.

AK_
  • 1,879
  • 4
  • 21
  • 30

1 Answers1

0

That is what it is supposed to do. It is restoring each transaction. Each time an auto renewable transaction renews you get a new transaction. Just check if you have already restored the feature in your above method and ignore the restored transaction if you have.

Martin Lockett
  • 2,275
  • 27
  • 31