SKReceiptRefreshRequest vs restoreCompletedTransactions

My application uses a subscription model, and I receive complaints when some users cannot restore their subscription through SKPaymentQueue.restoreCompletedTransactions. They must uninstall the application and download it from the AppStore.

I'm not quite sure why this happens only to some users, one of them told me that he canceled and resumed work through itunes, and the other about a payment problem.

So why do they need to reload the application? I assume that some information is not being updated properly on receipts, so I was thinking of using SKReceiptRefreshRequest instead of restoreCompletedTransactions, or maybe using both.

Can someone explain the differences between the two processes?

+4
source share
1 answer

This is a very simple difference between SKReceiptRefreshRequest and RestoreCompletedTransactions:

SKReceiptRefreshRequest

Updating the receipt requests the latest copy of the receipt from the App Store. Updating a receipt does not create any new transactions. Although you should avoid re-updating several times in a row, this action will have the same result as updating it only once.

RestoreCompletedTransactions

, , . , , , . .

SKReceiptRefreshRequest, . , , :

  • , Apple, , .

  • iOS , iOS 7, , .

  • , .

: https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/Restoring.html#//apple_ref/doc/uid/TP40008267-CH8-SW9

+7

Source: https://habr.com/ru/post/1662457/


All Articles