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. :)

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Matthew Leak
Matthew Leak

Written by Matthew Leak

UK-based Technology Consultant working in London and Manchester.

No responses yet

Write a response