I've added IAP to an iOS App that includes consumables and non-consumables. I'm going though each criteria for Testing at All Stages of Development with Xcode and Sandbox and Step 10 of Testing an Interrupted Purchase is not happening.
For the transaction...
- I've set everything up
- I get the transactionState .failed and
- I call finishTransaction for the queue (as outlined in the docs)
- After accepting the agreement, the payment queue does not receive a new transaction.
Is anyone experiencing the same thing? If yes, how to do get around updating the purchase?
If I call restoreCompletedTransactions on the queue, it will pull the transaction (FYI - I am doing a single purchase on a consumable item to start).
So does this mean I need to call up the queue on my own each time an interruption appears? (as there is no way to determine if and when the user completed the interrupted transaction).
I would appreciate input and how to handle this gracefully so that I can update the UI.
Thanks!
I am also seeing the same issue as you. Xcode 12. IOS14.5
step 10 per apple docs (https://developer.apple.com/documentation/storekit/original_api_for_in-app_purchase/testing_in-app_purchases_with_sandbox/testing_an_interrupted_purchase) doesn't get triggered until there is an app relaunch happening
Your clue about using restoreCompletedTransactions is at least helping me to update the UI, while it's really a hack, I see no other solution to this scenario as of now.
wondering if you were able to resolve this besides using the restore?