Hey @Alireza Nazer , would’t the current app user ID be the one that you passed to logIn()?
Jens wrote:
Hey @Alireza Nazer , would’t the current app user ID be the one that you passed to logIn()?
Hi, I don't provide an App User ID of my own , I receive anonymous app user id in purchaserinfo which is the original app user id but I need the current anonymous app user id because it can vary over different devices.
We can see it in webhook events but I need it in my app when it lunches.
I see. You can access the app user ID from the SDK (on iOS, there’s this method, on Android, you can access it through Purchases.sharedInstance.appUserId) .
Jens wrote:
I see. You can access the app user ID from the SDK (on iOS, there’s this method, on Android, you can access it through Purchases.sharedInstance.appUserId) .
Yes, you are right but it returns the original app user ID which can be different from current user id.
When user runs the app on tow different devises, it returns the same app user ID, but there is different current user ID`s in webhook.
Are you sure? I am not talking about PurchaserInfo / CustomerInfo.originalAppUserId, I am talking about Purchases.shared.appUserId. That one should not get overwritten with the original app user ID.
Jens wrote:
Are you sure? I am not talking about PurchaserInfo / CustomerInfo.originalAppUserId, I am talking about Purchases.shared.appUserId. That one should not get overwritten with the original app user ID.
Yes, You are right.
I made a mistake and “Purchases.shared.appUserId” is the one which I was looking for.
Thanks a lot.
Fantastic, that’s great to hear! 