At WWDC 2020, Apple introduced the ability to do local StoreKit testing in Xcode (that is, testing without connecting to App Store servers and without using sandbox accounts). I would like to use that local StoreKit testing to test restoring RevenueCat-enabled purchases after an app re-install.
Unfortunately, even though such a restore succeeds when testing on a device using a sandbox account, that restore always fails when performed using local StoreKit testing in Xcode (either on a real device or on the iOS Simulator).
My question: does RevenueCat support the restoration of purchases after an app re-install when local StoreKit testing in Xcode is being used to make and subsequently restore the purchases?
Here are the steps I performed in the effort to test the restore of purchases using local StoreKit testing. Note: I have tried these steps both on a real device and in the iOS Simulator, and the result is the same in each case.
-
I set up local StoreKit testing in Xcode with a StoreKit configuration file using RevenueCat's instructions (and importantly uploading the public certificate to RevenueCat).
-
I successfully make an in-app purchase using the local StoreKit testing scheme. The RevenueCat purchaserInfo object resulting from that transaction properly registers the entitlement for that purchase.
-
I delete the app
-
I use Xcode to re-install the app. I tap the button in my app to restore purchases, which triggers a Purchases.shared.restoreTransactions call.
-
The purchaserInfo object returned from that call does not contain the entitlement from the previous purchase. (Possibly of note?: that object contains only one RevenueCat RCAnonymousID app user ID, and it is different from the RevenueCat RCAnonymousID app user ID originally returned when that purchase was successfully made before the app deletion and re-install.)
-
The RevenueCat debug log in Xcode returns the following error: "ERROR: The data object identifier couldn't be found on the receipt."
It looks as if RevenueCat can't successfully restore the purchase previously made using local StoreKit testing (and, as noted above, that appears to be true regardless of whether the local StoreKit testing occurs on a real device or in the iOS Simulator). Is that because RevenueCat doesn't currently support restoration of purchases made using local StoreKit testing, or is there some other reason for that failure?
Thanks for any info anyone has.