Solved

Understanding RevenueCat's Use of Anonymous IDs Without Internet Connection

  • 26 February 2024
  • 2 replies
  • 17 views

Badge +1

Hello RevenueCat Community,

I've encountered a scenario in my app where RevenueCat seems to be assigning an anonymous ID to the user even when I have previously configured the SDK with a specific appUserID. This behavior appears to manifest when there's no internet connection available.

From my understanding, once a user is assigned a specific appUserID, RevenueCat should use this ID for any future interactions, including syncing purchase information or entitlements. However, in offline scenarios, it seems to revert to using an anonymous ID, which I find perplexing.

Could someone clarify under what conditions RevenueCat opts to use an anonymous ID instead of the appUserID provided during SDK configuration? Additionally, are there best practices or considerations we should be aware of to ensure consistent user identification, especially in offline scenarios or during network interruptions?

I can handle network issue, and ask the user to turn on the network, but it’s different for the issue when trying to logout with an anonymous user.

Thank you in advance for your guidance!

 

 

icon

Best answer by Ryan Glanz 28 February 2024, 18:29

View original

This post has been closed for comments

2 replies

Userlevel 3
Badge +8

Hi!

Yes, we do have guidance for only using custom IDs. What could be happening is that you’re calling logout() somewhere, or your restore behavior is set to ‘transfer’ rather than ‘keep with original user id’

Badge +1

Hi!

Yes, we do have guidance for only using custom IDs. What could be happening is that you’re calling logout() somewhere, or your restore behavior is set to ‘transfer’ rather than ‘keep with original user id’

Thank you for your quick answer. It was a possible reason, but instead of trying to logout with revenue cat and display a message if there’s an error, I decided to logout everytime (it’s best for the user experience). It’s working fine 🙂 Sorry for the noise, it’s my first time implementing this on my app so I’m trying things.

 

Thanks again for your help !