Okay so I've been working on this React Native project for a few weeks now without any issue. I recently updated to xCode 8.0 and RN build is failing. When I do "react-native run-ios", it returns a "BUILD FAILED" error. I tried it through xCode and it returns something similar. I tried looking around but I can't seem to find a solution to this. I'm sure it's probably some setting that changed within xcode that's messing it all up.
Running through terminal
> ** BUILD FAILED **
>
>
> The following build commands failed: CompileC
> /Users/macuser/Documents/FreeLance/theHaps/DaHAPS/ReactApp/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/macuser/Documents/FreeLance/theHaps/DaHAPS/ReactApp/node_modules/promise/lib/done.js:10
> throw err;
> ^
>
> Error: xcodebuild process exited with code 65
> at ChildProcess.<anonymous> (runIOS.js:102:14)
> at emitTwo (events.js:100:13)
> at ChildProcess.emit (events.js:185:7)
> at maybeClose (internal/child_process.js:850:16)
> at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
Running through xcode:
Thank you!
You need to remove the custom compiler flags of
-Werror
and-Wall
and clean(SHIFT + CMD + K)
Step 1:
Step 2:
Picture of settings
Step 3:
Clean & Rerun your project and it should work like normal.
Answer from the OP of this question:
Now i have a solution to fix this
Select
RCTWebSocket
target in XCode and removeflag
inbuild setting > custom compiler flag
then build and run again!Note: This answer is posted as an edit of the question described above. I just edited the question and created an answer on behalf of the OP and made it community wiki so that no credit goes to me. But now, that question is merged with this question and the answer moved here. I do not know anything about the context of these two questions. I just got that in review queue.