Fixing the React Native RCTSRWebSocket.m error
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***.
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. :)