I get this linker error using CocoaPods with React Native: ld: library not found for -lReact
I followed the guide at https://facebook.imtqy.com/react-native/docs/embedded-app-ios.html#content
I am trying to integrate with an existing iOS project, which is a JUCE C ++ project. JUCE creates the Xcode project file, so I believe that I need to use the Cocoapods method.
I am doing the following steps:
- create or save an iOS build from the Introjucer project
- run
npm install react-native from the project root (along with the .jucer file) - create a subfile in
Builds/iOS according to the manual (but with ../../node_modules as the path) - run
pod install - open workspace in Xcode
- configure
GCC_PREPROCESSOR_DEFINITIONS to include $(inherited) - to build
An example project showing this problem is located at https://github.com/adamski/juce-native-navigation/tree/react-native-cocoapods
I think something is happening with the project created by Introjucer since I tried the whole process on a new new Xcode project and it works great.
I also tried adding libReact.a to the "Linking binaries to libraries" section, but it didn't seem to help.
source share