I’m trying to implement Restore purchase for my first app using RevenueCat for Apple device. Want to understand how Restore Purchase work in RevenueCat
- When we call restore purchase, Does it check based on Apple account ID associated with that device / sandbox environment, or does it check based on the App User ID that we set for that session when initializing RevenueCat SDK?
- My paywall appears only after user has logged in if there is not any active subscription for that user, so RevenueCat SDK is always initialized with a valid App User ID. Let say a user login with email a@mail.com, make a subscription, then logout. He then sign up with a new email and log back in with email b@mail.com on the same device that uses the same Apple account ID. Would my understanding be correct that:
- He will see a paywall when logging back in with b@mail.com , since he is now being identified with a different App User ID which RevenueCat has not associated with any subscription yet
- If user clicks on Restore purchase, the customer info object returned by `Purchases.restorePurchases()` would show that there is an active subscription (since Apple account ID is the same)
- I can then implement the correct logic flow to disable the paywall accordingly