I am a little lost here and could use some pointers/help. I have a Flutter application which has Ads in it. I have no concept of a “user” in my app. I would like to add the ability to remove Ads. I created all the required store setup for both Google and Android. I’ve added a button in my app to purchase the product I setup (I have only the one product) to remove Ads. This all works as expected on both Android and iOS.
I need to implement the “restore” capability in my app per the Apple App Store requirements. I have questions as I can’t seem to figure out exactly how to do this.
- Since I use anonymous accounts wouldn’t the user, upon removal of the app and reinstallation get a new anonymous ID? If so, how does the system know they already purchased my product?
- How is this done typically, should I show both a Purchase and a Restore option in the app? Seems like there should be a way to ‘detect’ that the user already made a purchase and if so provide the ‘restore’ option...and if not then provide the ‘purchase’ option.
- From the docs Restoring Purchases (revenuecat.com) it appears I just call the following, then check to see if the entitlement isActive, is that correct?
CustomerInfo customerInfo = await Purchases.restorePurchases();