Solved

Should getCustomerInfo() return the same entitlement data across iOS and Android?

  • 7 December 2023
  • 1 reply
  • 35 views

Badge

Hello!

 

While testing my RC integration in React Native, I noticed that my call to Purchases.getCustomerInfo is retrieving different data for customerInfo.entitlements.all for the same user across my iOS and Android emulators. I do know that Android has some emulator issues but the call isn’t failing or anything.

Initially I thought maybe getCustomerInfo is specific to the platform it’s being called on, but I’m actually seeing the same Stripe entitlements in customerInfo?.entitlements?.all on both platforms. It’s really just on Android that I’m not seeing the iOS entitlements that I see on iOS. I confirmed that both responses have the same originalAppUserId.

 

This is introducing issues in my backend because I’m setting subscriptions as inactive in my database if they’re not present when sending this entitlements response to my backend which I’m using as the source of truth. i.e., in this case, my Android response isn’t seeing the iOS entitlements so I’m setting them as inactive. But then opening the app on my iOS emulator finds those entitlements and re-activates them in my db.

Any idea what the issue could be? Is it just an emulator problem? Should my BE logic be platform-specific before setting anything as inactive?

Thank you!

icon

Best answer by sharif 16 December 2023, 03:48

View original

1 reply

Userlevel 5
Badge +9

Hey @sportual-f1c0a4,

Sorry for the delay here. You should be seeing the same entitlements on both Android and iOS as long as you’re using the same user ID. Can you open a support ticket so we can look into some specific examples?

Reply