When building react native apps metro bundler automatically pops up on new terminal window (if it is not running already).
Problem When configuring CI tool (Jenkins), for beta and release deployments, this behavior is blocking, because we want to setup 2-3 different applications and if one instance of Metro Bundler was opened before, other application build with fail.
I've checked all "Run Script" phases on XCode project. There isn't any script which opens Metro Bundler.
Does we really need metro bundler server if configurations is not debug? If no, then how to disable it on during release builds.
Thanks.
Looking at the Start Packager step in the build process, it looks like you can set RCT_NO_LAUNCH_PACKAGER to a non-empty value to disable the packager. This worked for me running a release build using react native 0.61.5.
I followed this https://reactnative.dev/docs/publishing-to-app-store and it solved the issue for me.
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.
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