Fixing the React Native RCTSRWebSocket.m error

Matthew Leak
1 min readNov 12, 2016


Occasionally when building a React Native application for iOS you’ll want to open the Xcode project and either build/simulate the application from within Xcode instead of running react-native run-ios --simulator "iPhone 7" from your Terminal.

Almost always (at least for me) my builds from inside Xcode will initially fail per session (laptop reboot). The first time I saw this error , I was confused to f***.

RCTSRWebSocket.m error inside Xcode

Upon doing some digging on GitHub in the React Native issue tracker, I came across the solution which is incredibly simple.

In the project navigator in Xcode, navigate to:
[Your project] > Libraries > RCTWebSocket.xcodeproj

From here navigate to:
Build Settings > Apple LLVM 8.0— Custom Compiler Tags

Remove everything under “Other Warning Flags” from inside “Debug” and “Release”.

Your builds will now succeed. :)



Matthew Leak

UK-based Technology Consultant working in London and Manchester.