Skip to main content
Question

Making a purchase on iOS Simulator with Storekit does not work if you log the user in using Purchases.logIn() on React Native

  • February 10, 2022
  • 2 replies
  • 209 views

Forum|alt.badge.img+8

Hi,

 

I have setup StoreKit on my React Native app so that I can test out making purchases for a `auto renew subscription` on a simulator. However when trying to purchase a subscription using `await Purchases.purchasePackage(product)` its was failing with the `UKNOWN ERROR`. I manage to get it working by removing the login call (i.e. await Purchases.logIn(userId)) which I was doing when a user logged into my app. However this is not an ideal solution as I want to correctly identify the user by logging them into RevenueCat.

 

Is this an issue with StoreKit and RevenueCat? Or am I doing something wrong?

 

Cheers,

Walter

2 replies

sundeep
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • 138 replies
  • February 10, 2022

Hi @Walter Holohan,

Thanks for reaching out. Would you be able to share debug logs of this so I can look at the context of the error? You can enable debug logs by following this guide. After they're enabled you'll see logs like this in the console:

[Purchases] - DEBUG: No cached entitlements, fetching
[Purchases] - DEBUG: GET /v1/subscribers/<APP_USER_ID> 200
[Purchases] - DEBUG: Purchaser info updated, sending to delegate

Make sure the debug logs include the entire app life-cycle, including the messages printed during initialization of the SDK. (But feel free to scrub out any information you find sensitive)


Forum|alt.badge.img+8
  • Author
  • Dedicated Member
  • 19 replies
  • February 17, 2022

@sundeep I sent a reply with the logs, however it said that the post needed to be reviewed first before publishing. Can you take a look please?


Reply


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