I am following the instructions to setup expo-updates
for XCode. The last step requires modification in the Bundle React Native code and images
phase. However, XCode crashes without any error report as soon as I expand the phase.
Additional Info:
The problem is that I do not have a shellScript
property for the Bundle React Native codes and images
phase. The solution is as follows:
Go to project.pbxproj
, search for Bundle React Native codes and images
, it should be the parts where you can see the properties such as isa
, buildActionMask
, files
etc.
Add shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
Here is an example result:
SOME_UNIQUE_ID /* Bundle React Native Code And Images */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = SOME_UNIQUE_NUMBER;
files = (
);
inputPaths = (
);
name = "Bundle React Native Code And Images";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
/* this is the new line added */
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh\n";
};
Now XCode will not crash when expanding the Bundle React Native codes and images
phase.
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