Skip to main content
Solved

Should I include the App User ID in the Purchases script with a Unity based iOS app?

  • December 4, 2024
  • 2 replies
  • 25 views

Darren John McNally
Forum|alt.badge.img+3

Hi everyone,

I’m currently improving the subscription setup for a few Unity-based iOS apps, following the RevenueCat UnityInstallation Guide.

While testing with sandbox accounts on devices, I noticed an issue:

  • If I include the App User ID in the Purchases script, the app assumes I’ve already made a non-consumable lifetime purchase.
  • When I remove the App User ID from the script, sandboxed purchases work perfectly and the transaction shows up in the RevenueCat Overview with Sandboxed data.  

This brings me to my question:

  • Should I include the App User ID when publishing the app to the App Store?
  • What are the implications of not entering the App User ID? For example, would it affect RevenueCat’s ability to track future purchases or customers?

Thank you in advance for your help!

Cheers!
-DJ
 

 

Best answer by Ryan Glanz

Hey ​@Darren John McNally, we have some docs on the default behavior of configuring the SDK without an App User Id here: https://www.revenuecat.com/docs/customers/user-ids#anonymous-app-user-ids

 

In short, we will generate an anonymous id to track purchases for.

 

Are you able to add a variable to that field, or just a hard-coded string? If it’s just a string, that sounds like every instance of the app is being configured with the same App User Id (not good). In that case, I’d just leave it blank.

View original
Did this post help you find an answer to your question?
This post has been closed for comments

2 replies

Ryan Glanz
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • 383 replies
  • Answer
  • December 6, 2024

Hey ​@Darren John McNally, we have some docs on the default behavior of configuring the SDK without an App User Id here: https://www.revenuecat.com/docs/customers/user-ids#anonymous-app-user-ids

 

In short, we will generate an anonymous id to track purchases for.

 

Are you able to add a variable to that field, or just a hard-coded string? If it’s just a string, that sounds like every instance of the app is being configured with the same App User Id (not good). In that case, I’d just leave it blank.


Darren John McNally
Forum|alt.badge.img+3

Thanks, ​@Ryan Glanz that answers my question. I’ll leave the App User ID blank.  

 

“If you don't provide an App User ID when instantiating the Purchases SDK, RevenueCat will generate a new random App User ID for you and cache it on the device. In the event that the user deletes and reinstalls the app, a new random App User ID will be generated.”

 

Appreciate the response. 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings