10

I developed a react native app using react-native-firebase library. I want to set my app icon, so I used this library:npm install -g yo generator-rn-toolbox from here.

When I try to build the project I receive this error:

Undefined symbols for architecture arm64: "_OBJC_CLASS_$_RCTSRWebSocket", referenced from: objc-class-ref in libReact.a(RCTInspectorPackagerConnection.o) "_OBJC_CLASS_$_RCTReconnectingWebSocket", referenced from: objc-class-ref in libReact.a(RCTPackagerConnection.o) ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) How do I fix this ?

1
  • 1
    Same issue when building an expokitbased app for an ios 11 device. Commented Sep 6, 2017 at 14:34

3 Answers 3

13

I fixed it by manually adding the RCTWebsocket library:

  1. find the RCTWebsocket project: open -R node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj
  2. Drag it into xcode under your projects Libraries folder
  3. on your project, select your project target, then goto "Build phases" --> "Link Binaries With Libraries" --> "+"
  4. Search for libRCTWebSocket.a and add it

your project should build now. If libRCTWebSocket.a in step 4 is not there, try to build the project first.

Sign up to request clarification or add additional context in comments.

1 Comment

I just followed the 3rd and 4th steps, Its got fixed, Thanks @macrozone :)
5

I had the similar issue for iOS 12, XCode 10. For those that may help (and avoid losing days like me..), i had to add the libRCTWebSocket.a and the libfishhook.a binaries in the YourProject -> Targets -> YourProject -> Link Binary With Libraries list

Comments

4

I was able to build the app by placing libRCTWebSocket.a before libReact.

xcode linker settings

1 Comment

finally! this did the trick, but in the test target (after a full day)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.