I have a “no login” app using anonymous ID’s and working fine in a sandbox environment.
The action to take is unclear when deleting and re-installing the app or moving to a new device.
When I delete the app and re-install, I allow the user to “restoreTransactions” which fails because the app now has a new anonymous ID. If I programmatically login with the original anonymous ID, then restore works as expected.
But I don’t want to be saving ID’s anywhere after the user removes the app, right?
Am I missing something simple?
Best answer by cody
If you’re using anonymous IDs, and don’t want to use custom IDs/don’t have a custom auth system, restoring purchases is the way to go here. Restoring purchases takes a user’s device receipt and syncs it with RevenueCat’s backend, where we then grant the user access to the purchases by either transferring the receipt to the new user ID or aliasing the user IDs together, depending on your configuration.
If you’re seeing restoreTransactions fail, you’ll want to be sure you’re signed into the correct Apple ID/Google Play account as it will only sync the receipt of the current account.