`React/RCTBridgeModule.h` file not found

QUICK FIX (not the best)

Change the import react-native header lines:

 #import <React/RCTBridgeModule.h>
 #import <React/RCTLog.h>

To:

 #import "RCTBridgeModule.h"
 #import "RCTLog.h"

Here is an example of changes I had to make for the library I was trying to use: Closes #46 - 'RCTBridgeModule.h' file not found.


Make sure you disable Parallelise Build and add React target above your target

enter image description here


In my case this particular problem happened when I was trying to archive a 0.40+ react-native app for iOS (solution was found here: Reliable build on ^0.39.2 fails when upgrading to ^0.40.0).

What happened was that Xcode was trying to build the react-native libraries in parallel and was building libraries with implicit react dependencies before actually building the react library.

The solution in my case was to:

  1. Disable the parallel builds:

    • Xcode menu -> Product -> Scheme -> Manage Shemes...
    • Double click on your application
    • Build tab -> uncheck Parallelize Build
  2. Add react as a project dependecy

    • Xcode Project Navigator -> drag React.xcodeproj from Libraries to root tree
    • Build Phases Tab -> Target Dependencies -> + -> add React