
我正在按照使用说明设置XCode的expo-updates。最后一步需要在Bundle React Native code and images阶段进行修改。但是,一旦我展开这个阶段,XCode就会崩溃而没有任何错误报告。
附加信息:
发布于 2021-03-17 01:11:27
问题是,对于shellScript阶段,我没有一个Bundle React Native codes and images属性。解决办法如下:
转到project.pbxproj,搜索Bundle React Native codes and images,应该是可以看到isa、buildActionMask、files等属性的部分。
添加shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
下面是一个示例结果:
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";
};现在,XCode在扩展Bundle React Native codes and images阶段时不会崩溃。
https://stackoverflow.com/questions/66665183
复制相似问题