在一台MAC上编译的RN工程,到另外一台机器上无法编译失败,报done.js:10的错误
** BUILD FAILED **
The following build commands failed:
CompileC /Users/qx/Documents/react/TestDemo/ios/build/Build/Intermediates/RCTWebSocket.build/Debug-iphonesimulator/RCTWebSocket.build/Objects-normal/x86_64/RCTSRWebSocket.o RCTSRWebSocket.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
/Users/qx/Documents/react/TestDemo/node_modules/promise/lib/done.js:10
throw err;
^
Error: xcodebuild process exited with code 65
at ChildProcess.xcodeBuildProcess.on.code (/Users/qx/Documents/react/TestDemo/node_modules/react-native/local-cli/runIOS/runIOS.js:102:14)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:852:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
错误原因:
升级xcode8后导致的错误
解决方法
- 升级xocde8后,打开工程,选择
team
证书,编译工程,编译可能正常 - 如果编译失败报错RCTWebSocket
- 方法1:
1.打开RCTWebSocket.xcodeproj依赖库,build settings > custom compiler flags
2.移除flags - 方法2:
1.直接修正报错的代码
参考代码: https://github.com/facebook/react-native/issues/8584#issuecomment-236366222
网友评论