`React/RCTBridgeModule.h` file not found

后端 未结 21 2272
执笔经年
执笔经年 2020-11-30 00:31

Getting this error while building a react-native iOS app on xcode.

Started getting this error after npm install and rpm linking react-native-fs library. But

21条回答
  •  迷失自我
    2020-11-30 00:34

    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

提交回复
热议问题