To your question, yes, the app receipt after a new install on a 2nd device after you had already subscribed would contain the past purchase. Note that if the 2nd device already has the app installed before the 1 set device made the purchase, then it would not.
Thanks a lot for sharing this information. I had no idea using using server receipt validation also implicitly refreshed the receipt. For the case of Auto renewable subscriptions especially this is a bit of a bummer. I was expecting/hoping StoreKit would push an auto-renewable subscription purchase to all devices logged in with the same Apple ID via SKPaymentQueue, but it does not until at least the first iAP receipt for the subscription is active on the device.
Couldn't a manual call to -restoreCompletedTransactions on SKPaymentQueue achieve the same thing at launch (if determined that no iAP receipt is present). This is a single method call and the code would be way simpler. I'm aware that using server side receipt validation has other benefits but I'm specifically referring to proactively restoring in app purchases.
Local receipt validation wasn’t discussed specifically because it won’t have the latest purchase status reliably, therefore you can’t create this experience accurately.
Therefore to create such an experience you will either need to adopt StoreKit2 or use verifyReceipt with app receipts.
I can still think of a way that this won't provide exactly the user experience I was hoping for.
- On app launch use server-side receipt validation.
- Install the app both on two devices, an iPhone and an iPad. Launch the app on both devices.
- Subscribe to an auto renewable subscription on an iPhone.
- Since the app is already running on the iPad, server side receipt validation already finished before the purchase made on the iPhone completed, so the user still needs to use the "Restore in app purchases button" manually
If the server pushed auto renewable subscription purchases to all devices logged in with the same Apple ID developers wouldn't have to worry about such timing issues. I suppose it would be possible for developers to manually implement this with either with their own server or CloudKit, but it would be really nice if StoreKit just did it.