linker command failed in react native app, using react-native-firebase

Viewed 6887

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 ?

3 Answers

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

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

xcode linker settings

Related