Problem: I call [[SKPaymentQueue defaultQueue] restoreCompletedTransactions]; And it return to my observer paymentQueueRestoreCompletedTransactionsFinished: SKPaymentQueue with empty transactions array. But I have purchased non-consumable in-apps.
I'm testing how my app could restore purchases from different states.
Simple steps to reproduce:
- Add payment and complete purchase. The queue returns
SKPaymentTransactionStatePurchasedtransaction, so the app enables feature and finalize transaction in queue. - Remove information about purchase, so I can re-purchase. (imagine, that a user reinstalled the app, or start using the app on another device)
- Try to purchase in-app again. receive "You've already purchased this. Tap OK to download it again for free.". Press OK, and the queue returns
SKPaymentTransactionStatePurchasedtransaction, so the app enables feature and finalizes the transaction in queue. - Remove information about purchase again.
- Try to purchase in-app once again. Receive "You've already purchased this In-App Purchase but it hasn't been downloaded.". There is only one OK button, and even before you could press it, you'll receive transaction with state
SKPaymentTransactionStateFailed. The app finalizes the transaction, but it won't enable feature when transaction is failed. - Finally try to restore completed transactions with
[[SKPaymentQueue defaultQueue] restoreCompletedTransactions];. And it return to observerpaymentQueueRestoreCompletedTransactionsFinished:SKPaymentQueuewith emptytransactionsarray.
I feel that something is broken in Apple Sandbox servers, so I can't restore transactions correctly. Or am I doing something wrong?