Skip to main content

I have implemented consumable in-app purchases with revenue cat and wanted to use the anonymous ID (“$RCAnonymousID:…) to keep track of the purchases a user has made. This seems to work fine until a user reinstalls the app or I upload a new version of the app. I call the restore function to get previous purchases but if I check the ID with the originalRevenueCatID method I get a different ID if I reinstall the app

I tested this with TestFlight (iOs) and reinstalled the same version of the app after I purchased something but the purchase is gone and also the ID is something else. Is this because of TestFlight maybe and it should work if I publish the app? Or is this generally not possible?

I basically wanted to not force the user to create an account and still be able to keep track of in-app purchases across multiple versions of the same app and of course re installations

Hope this is the right place to ask. Would appreciate any kind of advice!

So, generally no. There isn’t a way to persist the app user id between installs. We store it in the app container which gets deleted when you uninstall the app.

There are some tricks you can do for storing it in the keychain, but that’s an advanced use case and not without it’s complications. We don’t do this internally in the SDK.

 

I’d suggest reading this to better understand how customer ids work. For your use case, you should be able to do restores to connect anonymous users, the receipt will contain the same purchases and we will associate the users with each other.


Reply