因此,正如标题所说,我尝试了两个Xcode版本,但仍然没有成功。这是我正在犯的错误:
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_RCTCxxBridge", referenced from:
objc-class-ref in libReact.a(RCTBridge.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)我试过:
RCTCxxBridge和CxxBridge而不是BatchedBridge,因为它应该是不推荐的但还是没有运气..。请在这里提供任何提示:)
发布于 2018-09-05 05:07:48
因此,根据评论,显然是之前失败的构建缓存破坏了我的归档过程。我所要做的就是删除node_modules、ios/builds和ios/Pods,然后再做npm install、react-native link和cd ios && pod install,项目进行得很好。
之后,我得到了duplicate symbols on arm64错误,这仅仅是因为react-native和RCTWebSocket都有一些重叠的类。因此,为了解决这个问题,我只需从项目的通用选项卡的libRCTWebSocket.a信息子类别中删除XCode。
特别感谢“解决方案的睡眠不足”!
https://stackoverflow.com/questions/52147460
复制相似问题