Hi,
I need help with Expo In App Purchases. I implemented buying of auto-renewable usbscriptions in my app using Expo In App Purchases library, but during review Apple wrote:
Users restore transactions to maintain access to content they’ve already purchased. For example, when they upgrade to a new phone, they don’t lose all of the items they purchased on the old phone. Include some mechanism in your app to let the user restore their purchases, such as a Restore Purchases button.
I see in docs, that there is getPurchaseHistoryAsync method, that can be used to restore user’s purchases. Questions I have are:
- When user loggs in to my app, how can I detect that his subscription must be restored, so that I can show the “restore” button? Apple said that automatic restoration will not go through review.
- Is it enough to call getPurchaseHistoryAsync method and it will automatically restore user’s purchases?
- What is the exact scenario when restoration is needed? Is it this one:
- Application user loggs into my app and buys subscription as an iTunes user “A”
- The same application user loggs into my app on different device, using iTunes user “B”
- I should detect somehow that subscription for my app has been bought on different iTunes account/device and show “restore” button
- Restore payments for iTunes user “B” if application user mentioned above clicks the button.
?
Thanks in advance!