首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >展开“捆绑反应本机代码和图像”阶段时,XCode崩溃

展开“捆绑反应本机代码和图像”阶段时,XCode崩溃
EN

Stack Overflow用户
提问于 2021-03-16 23:57:51
回答 1查看 921关注 0票数 2

我正在按照使用说明设置XCode的expo-updates。最后一步需要在Bundle React Native code and images阶段进行修改。但是,一旦我展开这个阶段,XCode就会崩溃而没有任何错误报告。

附加信息:

  • Mac (苹果M1芯片)
  • XCode 12.4
  • 反应本地0.63.4
EN

回答 1

Stack Overflow用户

发布于 2021-03-17 01:11:27

问题是,对于shellScript阶段,我没有一个Bundle React Native codes and images属性。解决办法如下:

转到project.pbxproj,搜索Bundle React Native codes and images,应该是可以看到isabuildActionMaskfiles等属性的部分。

添加shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";

下面是一个示例结果:

代码语言:javascript
复制
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阶段时不会崩溃。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66665183

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档