Reputation: 66
It seems like just about every tutorial and blog post out there has you integrating RN into an existing app using CocoaPods. Adding CocoaPods support isn't a possibility for our existing iOS app - we are relying on Carthage for dependency management already which doesn't seem to be supported by RN.
So, I went through the process of adding the dependencies manually by attempting to recreate the iOS app that is produced when using the RN CLI (react-native init):
-Add the React.xcodeproj from node_modules/react-native to my Libraries folder, and also add the other Libraries from node_modules/react-native/Libraries, such as RCTActionSheet.xcodeproj. Then, I added all of those to the 'Link Binary With Libraries' section in Build Phases.
-Updated 'Other Linker Flags' to -ObjC -Ic++.
...My app build is still failing with "RCTRootView.h file not found".
Does anyone have experience with just adding RN manually to an existing iOS project, that might be able to provide a definitive list of steps for adding it manually to an existing project?
Upvotes: 1
Views: 649
Reputation: 66
In addition to the other steps, I also needed to update the HeaderSearchPaths setting to point to the React folder in node_modules: https://i.sstatic.net/y6alY.jpg
Upvotes: 2