fedor05
fedor05

Reputation: 23

How to get a full list of user's in-app purchases/transactions from iOS App Store?

Here is my situation: in my app I have a set of consumable in-app purchases. All purchases sent to server to be validated and activated. But there is a possibility to encounter situation when user performed a purchase (paid money) but something happens during purchase activation (lost connection, server error, etc). In result both app and server do not know about purchase (lets take situation that app lost purchase data for some reason). So I need to get user's purchases/transaction from app store.

I've tried [[SKPaymentQueue defaultQueue] restoreCompletedTransactions]; but it does not return consumable purchases.

Is there any way to get a list of all purchases/transactions from app store?

Upvotes: 2

Views: 2070

Answers (1)

Chris Prince
Chris Prince

Reputation: 7564

Two possibilities: 1) If the interaction fails with your server, don't finish the transaction (ie, don't remove the transaction from the queue). That way your transaction observer will get it again and you can try your server again. 2) Finish the transaction, but store enough info on the app (eg, NSUserDefaults) to try again with the server later. You can start a timer that will try again later.

Upvotes: 1

Related Questions