I have been trying to find documentation on how to properly create a React Native build that does not need to be on a local network and can use carrier network, and can then be deployed for testing onto TestFlight.
I have been able to get stables on TestFlight but can't figure out how to get the App to run outside the local network.
I have tried this with no luck:
Inside the project AppDelegate.m, uncomment the line below the OPTION 2 comment:
jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];This causes the app to load from pre-bundled file on disk. Next, with the development server running (started with npm start), you can curl the URL in the comment, adding an extra dev query parameter:
curl http://localhost:8081/index.ios.bundle\?dev\=0 -o main.jsbundle'
Any ideas?
Since v0.14 JS and images are automatically packaged into the iOS app using
Bundle React Native code and imagesXcode build phase.
All you have to do is run the app from XCode and:
- Open
ios/YourApp/AppDelegate.m- Uncomment the line,
jsCodeLocation = [[NSBundle mainBundle] ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With