You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a CocoaPods setup using React Native 0.59.8. I encountered an issue building an archive last week that had to do with duplicate build artifacts. To address it, I followed @Salakar's advice and removed all the references to React from my xcodeproj, leaving it to CocoaPods to build React.
I am now able to build successfully from Xcode, including debug and release, to a simulator, a real device, or an archive. However, react-native run-ios fails during the linking step:
info Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_RCTLinkingManager", referenced from:
objc-class-ref in AppDelegate.o
info "_OBJC_CLASS_$_RCTReconnectingWebSocket", referenced from:
info objc-class-ref in libReact.a(RCTPackagerConnection.o)
info "_OBJC_CLASS_$_RCTSRWebSocket", referenced from:
info objc-class-ref in libReact.a(RCTInspectorPackagerConnection.o)
info ld: symbol(s) not found for architecture x86_64
info clang: error: linker command failed with exit code 1 (use -v to see invocation)
My Podfile follows:
# Uncomment the next line to define a global platform for your project# platform :ios, '9.0'target'SquadCal'do# Uncomment the next line if you're using Swift or would like to use dynamic frameworks# use_frameworks!# Pods for SquadCalpod'React',:path=>'../../node_modules/react-native',:subspecs=>['Core','CxxBridge','DevSupport','RCTText','RCTNetwork','RCTWebSocket','RCTAnimation','RCTImage','RCTLinkingIOS','RCTCameraRoll','RCTBlob','ART',]pod'yoga',:path=>'../../node_modules/react-native/ReactCommon/yoga'pod'DoubleConversion',:podspec=>'../../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'pod'glog',:podspec=>'../../node_modules/react-native/third-party-podspecs/glog.podspec'pod'Folly',:podspec=>'../../node_modules/react-native/third-party-podspecs/Folly.podspec'pod'RNScreens',:path=>'../../node_modules/react-native-screens'pod'RNGestureHandler',:path=>'../../node_modules/react-native-gesture-handler'pod'react-native-onepassword',:path=>'../../node_modules/react-native-onepassword'pod'RNVectorIcons',:path=>'../../node_modules/react-native-vector-icons'pod'react-native-splash-screen',:path=>'../../node_modules/react-native-splash-screen'pod'RNKeychain',:path=>'../../node_modules/react-native-keychain'pod'react-native-fast-image',:path=>'../../node_modules/react-native-fast-image'pod'react-native-orientation-locker',:path=>'../../node_modules/react-native-orientation-locker'pod'RNReanimated',:path=>'../../node_modules/react-native-reanimated'pod'react-native-async-storage',:path=>'../../node_modules/@react-native-community/async-storage'pod'react-native-netinfo',:path=>'../../node_modules/@react-native-community/netinfo'pod'react-native-notifications',:path=>'../../node_modules/react-native-notifications'pod'react-native-exit-app',:path=>'../../node_modules/react-native-exit-app'pod'react-native-keyboard-tracking-view',:path=>'../../node_modules/react-native-keyboard-tracking-view'pod'react-native-keyboard-input',:path=>'../../node_modules/react-native-keyboard-input'pod'react-native-cameraroll',:path=>'../../node_modules/@react-native-community/cameraroll'pod'lottie-react-native',:path=>'../../node_modules/lottie-react-native'pod'react-native-image-resizer',:path=>'../../node_modules/react-native-image-resizer'pod'RNFS',:path=>'../../node_modules/react-native-fs'end
Reproducible Demo
I don't have an MCVE at the moment. I'll try to do some more debugging first to see if I can get the linker to work. I'll document my work here. If I fail to come up with anything and you folks don't have any quick thoughts on how to resolve it, I can try and create a MCVE so you guys can repro.
The text was updated successfully, but these errors were encountered:
The reason it was working from Xcode was that Xcode stores DerivedData in ~/Library/Developer/Xcode/DerivedData, whereas react-native run-ios uses a custom path in ios/build. Simply removing that folder and rerunning react-native run-ios resolved my issue.
@Ashoat You just explained why it was working on Xcode but you did not explained why it was not working from the command line. Can you please clarify how you succeed to link from the command line since I do have the exact same problem and do not yet figure out what is the solution
Environment
Description
I have a CocoaPods setup using React Native 0.59.8. I encountered an issue building an archive last week that had to do with duplicate build artifacts. To address it, I followed @Salakar's advice and removed all the references to React from my xcodeproj, leaving it to CocoaPods to build React.
I am now able to build successfully from Xcode, including debug and release, to a simulator, a real device, or an archive. However,
react-native run-ios
fails during the linking step:My Podfile follows:
Reproducible Demo
I don't have an MCVE at the moment. I'll try to do some more debugging first to see if I can get the linker to work. I'll document my work here. If I fail to come up with anything and you folks don't have any quick thoughts on how to resolve it, I can try and create a MCVE so you guys can repro.
The text was updated successfully, but these errors were encountered: