Question

Expo and Storekit

  • 17 September 2023
  • 1 reply
  • 85 views

Badge +2

I didn’t understand how to test the inApp purchases on a iOS simulator using Expo.

 

I usually run my code with

npx expo run:ios    

 

I’ve created the subscription and certificate in XCode following the documentation: https://www.revenuecat.com/docs/apple-app-store#ios-14-only-testing-on-the-simulator

 

Now I’m not sure how to build/run correctly the app.

 

 


1 reply

Userlevel 3
Badge +6

Hey @wullig ,

 

We have a pretty useful tutorial on how to test with Expo that can be found on the blog post here. I have gone ahead and copied the testing section of the guide which can be found below:

Now that Expo has built our native apps for us, we can begin testing our React Native app and RevenueCat integration. We’ll do this by running a local development server that our native apps can connect to. That command is:

expo start --dev-client

When you open either the Android or iOS app, you’ll be presented with a screen to connect to the local development server. Your phone may find the local development server automatically, but it might not—I had to manually connect to mine by entering the local IP address of my computer.

Once you’re connected, it will load your React Native app. And if all goes well, RevenueCat will load your offerings and products!

If something goes wrong, there are some tools that you can use to debug. RevenueCat has debug logs that print to the console. If you are using an iOS device, you can use Console.app on your Mac to view these logs. If you are using an Android device, you can use LogCat (or Android Studio) to view these logs. The logs will show what products can or can’t be loaded, as well as any associated errors.

Reply