Search code examples
iosreact-nativereact-native-iosapple-developer

Unbale to load testflight in react native ios


I have an issue with react native application. when run application in development mode then works properly in device as well as a simulator but after upload test flight, when the app launch app will be crashed, if the development server is already running then test flight working otherwise app crashed.

Need to run test flight properly without loading development server. if anyone has an idea please let me know.

Thanks in advance.


Solution

  • Try to bundle your app in release mode. To do so, please try to follow these steps:

    1. Open your project in Xcode and clear build folder (select Product -> Clean), close Xcode

    2. Open Terminal, go to your project folder run command:

      react-native bundle --platform ios --dev false --entry-file index.js --bundle-output ios/[YOUR_PROJECT_NAME]/main.jsbundle --assets-dest=ios
      

    Pay attention to changing your index.js if you named it differently and [YOUR_PROJECT_NAME]

    1. Open Xcode again, give it some time to reindex the paths, build etc, then Archive your project and send it to Appstore TestFlight normally.

    PS Before sending it to TestFlight to avoid time waiting you can try to run your app from Xcode on device - it should also run without starting react native developement server.