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 ?
I was able to build the app by placing libRCTWebSocket.a before libReact.
I fixed it by manually adding the RCTWebsocket library:
open -R node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj
libRCTWebSocket.a
and add ityour project should build now. If libRCTWebSocket.a
in step 4 is not there, try to build the project first.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With