I tried a number of solutions I found on the web without any luck. I want to archive a react-native project but it keeps failing with this error
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_RCTCxxBridge", referenced from:
objc-class-ref in libReact.a(RCTBridge.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Here is my podfile
rn_path = '../node_modules/react-native'
pod 'yoga', path: "#{rn_path}/ReactCommon/yoga/yoga.podspec"
pod 'React', path: rn_path, subspecs: [
'BatchedBridge',
'CxxBridge',
'DevSupport',
'RCTText',
'RCTImage',
'RCTNetwork',
'Core',
'RCTWebSocket',
]
# 'Core',
# 'CxxBridge',
# 'BatchedBridge',
# 'DevSupport',
# 'RCTActionSheet',
# 'RCTAnimation',
# 'RCTGeolocation',
# 'RCTImage',
# 'RCTLinkingIOS',
# 'RCTNetwork',
# 'RCTSettings',
# 'RCTText',
# 'RCTVibration',
# 'RCTWebSocket',
The commented libraries were the one I tried to use at first and on searching I commented it and replaced it with the one that are there.
Here is the link binary with libraries list:
react-native version : 0.58.1
xcode version : 10.2