0

So SKPaymentQueue's restoreCompletedTransactions() retrieves transactions executed on another device onto the current device, therefore the respective product becomes available over multiple devices.

However, seeing that it returns a transaction(s), and saving those is a no no in apples books as there should only be one source of truth, how are those restored transactions persisted (in what ever form)?

Does the app's transaction receipt get updated too, by the restore? I ask because if the app is restarted I do not see it making sense to have to do another restoreCompletedTransactions() to check again if the user has a valid transaction for the product.

So, does restoreCompletedTransactions also update the app receipt?

Note: I already have the mechanics to access the receipt data, but don't have a second device to simulate a full restore.

pnizzle
  • 6,243
  • 4
  • 52
  • 81
  • 1
    Yes, it will update the receipt, but you would normally only restore transactions in response to the user tapping a "restore" button - You can refresh the receipt using an `SKReceiptRefreshRequest` – Paulw11 Dec 05 '19 at 05:10
  • @Paulw11 in my settings screen, in view did load. I am calling `SKReceiptRefreshRequest.start()` to refresh the receipt. But I assumed that only refreshes it for that device only. And then the user has to click `Restore` to invoke `restoreCompletedTransactions()` and get the receipt from other devices (so I hoped at least) – pnizzle Dec 05 '19 at 05:12
  • Right, so to answer your question, the receipt will be refreshed at the end of the restore process – Paulw11 Dec 05 '19 at 05:13
  • `Will be refreshed at the end of the restore process` -> Stupendous, cheers – pnizzle Dec 05 '19 at 05:14

0 Answers0