Skip to main content
Question

Expo Managed app works locally with RevenueCat, but crashes on launch in TestFlight


Forum|alt.badge.img+1

Hi everyone,

I’ve integrated RevenueCat’s React Native package into our Expo-managed app, and I’m running into an issue getting everything working in Testflight. I’ve added the getOfferings() and purchasePackage() functions into our app and everything is working as expected when running the app locally, but the app is crashing as soon as it’s opened in TestFlight. 

To create our build for TestFlight, I’m using

eas build --platform ios


Let me know if I’m missing anything or if you need anything from my side to help resolve this issue.

Thanks!

9 replies

Forum|alt.badge.img+1
  • Author
  • New Member
  • 2 replies
  • October 7, 2022

We’re using react version 18, and expo SDK version ~46.0.9. Not sure how to find useful logs from a build in Testflight - it doesn’t give an option to send crash feedback once it crashes. I also checked the iOS device logs and didn’t see anything in particular that looked related to the crash. Let me know if there’s any info I can attach to make this easier to understand;


Forum|alt.badge.img+1
  • New Member
  • 2 replies
  • October 9, 2022
DougG wrote:

Hi everyone,

I’ve integrated RevenueCat’s React Native package into our Expo-managed app, and I’m running into an issue getting everything working in Testflight. I’ve added the getOfferings() and purchasePackage() functions into our app and everything is working as expected when running the app locally, but the app is crashing as soon as it’s opened in TestFlight. 

To create our build for TestFlight, I’m using

eas build --platform ios


Let me know if I’m missing anything or if you need anything from my side to help resolve this issue.

Thanks!

@DougG  I have a question, can you still use ExpoGo when using "react-native-purchases"?  I was able to get offering and also do a purchase when building for TestFlight, but If I want to run my code in ExpoGo it explodes with an exception. I would like to keep using ExpoGo for testing other features (doesnt matter if I dont have access to IAP in ExpoGo). Any clue?

By the way I use the same command eas build --platform ios to build and publish to TestFlight and all works great.
 


Forum|alt.badge.img+1
  • Author
  • New Member
  • 2 replies
  • October 11, 2022
Alejandro wrote:
DougG wrote:

Hi everyone,

I’ve integrated RevenueCat’s React Native package into our Expo-managed app, and I’m running into an issue getting everything working in Testflight. I’ve added the getOfferings() and purchasePackage() functions into our app and everything is working as expected when running the app locally, but the app is crashing as soon as it’s opened in TestFlight. 

To create our build for TestFlight, I’m using

eas build --platform ios


Let me know if I’m missing anything or if you need anything from my side to help resolve this issue.

Thanks!

@DougG  I have a question, can you still use ExpoGo when using "react-native-purchases"?  I was able to get offering and also do a purchase when building for TestFlight, but If I want to run my code in ExpoGo it explodes with an exception. I would like to keep using ExpoGo for testing other features (doesnt matter if I dont have access to IAP in ExpoGo). Any clue?

By the way I use the same command eas build --platform ios to build and publish to TestFlight and all works great.
 

For locally running development builds in Expo, I believe we can only get it running by using

eas build --profile development --platform android

and then running this command after the build is finished

expo start --dev-client

I’ve been able to use this to run the app on the iOS simulator and real device. On my side, everything works locally but the app it’s crashing on load in Testflight. Would love to hear any suggestions anyone has on what I can do to debug a build in TestFlight.


Hope this helps!


I’ve been able to use this to run the app on the iOS simulator and real device. On my side, everything works locally but the app it’s crashing on load in Testflight. Would love to hear any suggestions anyone has on what I can do to debug a build in TestFlight.

 

 

Running into a similar issue . 


Forum|alt.badge.img+8
  • RevenueCat Staff
  • 509 replies
  • February 24, 2025

Hi ​@whiletruelearn, if you are able to run RevenueCat debug logs here and send those for when you try to load your app in TestFlight that would be helpful. If you can also send over any errors in XCode or a stacktrace that would be great. Please let me know your SDK version too.

Regarding Expo, we have some documentation that might help:

https://www.revenuecat.com/docs/getting-started/installation/reactnative#option-2-using-expo

https://www.revenuecat.com/blog/engineering/expo-in-app-purchase-tutorial/

 

See our Apple testing guides here:

https://www.revenuecat.com/docs/test-and-launch/sandbox/apple-app-store

https://www.revenuecat.com/blog/engineering/the-ultimate-guide-to-subscription-testing-on-ios/


  • New Member
  • 3 replies
  • February 26, 2025

@Haley Pace even after following the related guides, I got the same issue when I used the latest version of RevenueCat with Expo


I was able to figure it out. My problem was that the environment variable which was available in local was not available during EAS build. I had created an environment variable and that fixed the issue. ​@a0m0rajab , please check if that is your potential cause as well.


  • New Member
  • 3 replies
  • February 27, 2025

@whiletruelearn thank you for mentioning that, my issue was due to using ‘app.config.js’ I think it’s missing some variables or something, I removed that and used ‘app.json’ at this moment. 


  • New Member
  • 3 replies
  • February 27, 2025

After further inspection, I realised that my app was not getting the .env variables like what ​@whiletruelearn mentioned. when I added my .env to .ignore the expo build did not read that file and ignored it. 

 

Few references to understand the issue: 


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