I am trying to run the release build directly from the terminal and I did not found an option to do that.
From XCode what is required to do is:
Product -> Scheme -> Edit Scheme (cmd + <), make sure you're in the Run tab from the side, and set the Build Configuration dropdown to release.
http://facebook.github.io/react-native/docs/running-on-device-ios.html#building-your-app-for-production
There is any option available from the react-native-cli
to do the same? Something like react-native run-ios -configuration Release
?
My objective is to generate a build that does not require the server being running to provide to the QA team for instance.
To configure your app to be built using the Release scheme, go to Product → Scheme → Edit Scheme. Select the Run tab in the sidebar, then set the Build Configuration dropdown to Release .
From XCode what is required to do is: Product -> Scheme -> Edit Scheme (cmd + <), make sure you're in the Run tab from the side, and set the Build Configuration dropdown to release.
React Native enables you to write Android and iOS apps using JavaScript. It uses React's virtual DOM concept to manipulate native platform UI components, providing a familiar experience to users. There are two ways to build iOS apps: React Native CLI: More complex but gives you more control over your app.
I did a PR to the React Native project to allow this feature. The PR can be check here: https://github.com/facebook/react-native/commit/ca7cbdee858e84c4a74a2d9c7be151f5cfdcfbfe
So, in the future, to run a release build from terminal you just only need to type the following command: npx react-native run-ios --configuration Release
If you want run your project on a real device use --device
parameter:
npx react-native run-ios --configuration Release --device "Your Device Name"
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