My best guess is that I have to add an additional path in the ‘Header Search Paths’ section. Teh problem is that I don’t understand where BUILT_PRODUCTS_DIR corresponds to so I don’t know how to walk it to the pods folder.
But this turn out not to be the solution for the React/RCTBridgeModule.h error. Instead I had to go into the node module folder > react-native > React and then drag the React.xproj file into the libraries folder on the left hand panel in your project in xcode.
Once I had the React library in xcode then I clicked on the root folder in the left hand panel, then I clicked on my project name under TARGET in the next left hand panel over, then I clicked on Build Phases in the header and under Target dependencies I added (there is a plus symbol below the table of dependencies) the new React Library under React.
I have the same problem, but I still cannot fix the problem after follow your instructions. Can you give me more details about this problem? Thank you!
I gave up on this before I saw your description of how to get this working.
If a react-native module has pod install instructions - or a Podspec file - sooooooo much easier to install by changing the podfile (project > ios > podfile) like this:
We’re hoping this can be landed soon, which should make this whole situation way less painful.
(edit: it landed, so any third-party library which has a .podspec should just work with react-native link and there would be no need to modify the header search paths.)
I have Followed this Link react-native-share-extension - npm for referencing integrate image share from gallery to my app.If someone can help would be very grateful
The PR I referenced in my previous comment several months ago has landed in the interim, so react-native link works with any library that supports CocoaPods now.
If your third party lib doesn’t support cocoapods, you either need to add the relative header search path manually as described here, or alternatively you can ask the maintainers of that library to add cocoapods support.
With regards to react-native-share-extension that @sudeep asked about, it looks like the author hasn’t updated that library in a long time. Newer react native requires a triangle-style import such as <React/RCTBridgeModule.h>. So your best bet is to help the author fix that library.
Closing this very old thread since the original question doesn’t apply any more. Please open a new thread if you encounter new issues.