App Store sandbox, "Clear purchase history" does not work.

When testing in App Store Connect with a sandbox account it always restores the purchase even after I click "Clear purchase history". didRevokeEntitlementsForProductIdentifiers() was never called.

When I test with the StoreKit config file, deleting or refunding the purchase will call didRevokeEntitlementsForProductIdentifiers() and subsequent restores would be empty.

It works well with the config file. I do call SKPaymentQueue.default().finishTransaction(transaction) for purchase, restore and failed.

What is the real App Store going to do? Is a refunded or expired subscription going to be restored when I call SKPaymentQueue.default().restoreCompletedTransactions()?

In the production App Store, the restoreCompletedTransactions method is a StoreKit 1 API. It will restore all finished transactions made by the registered iTunes user that are either of type non-consumable are auto-renewing subscription. At the same time, when there are item to restore, the appStoreReceipt is updated to reflect the current transactions charged to the user. All of these transactions will be listed in the in_app array of the validated appStoreReceipt. It's the responsibility of the app process to detect whether individual transactions have been refunded, whether auto-renewing subscription transactions have expired or which auto-renewing subscription is active.

In the case of refunded transactions or for current auto-renewing subscriptions, pass in the "exclude-old-transactions" : true key then review the contents of the "latest_info_section" of the validated response to get the current information on such items.

To my knowledge, there is no clearing of transactions in the production App Store receipt. I would consider this a bug report issue if such a case were to be found.

Rich Kubota - DTS

Experiencing the same issue. Predictably useless answer from Apple

App Store sandbox, "Clear purchase history" does not work.
 
 
Q