'React/RCTBridge.h' file not found when trying to compile IntercomEventEmitter.m
See original GitHub issueI’m trying to include react-native-intercom
on my app. My app was built on Expo and was later ejected to allow installing react-native-intercom
.
On my latest try, I went with CocoaPods. After installing, I managed to add @import Intercom;
on top of AppDelegate.m
file and also included the
[Intercom setApiKey:@"{apiKey}" forAppId:@"{appId}"];
inside the didFinishLaunchingWithOptions
function. Before including react-native-intercom
, I tried to build to check if everything was correct and it built perfectly. Then I proceeded to add react-native-intercom
yarn add react-native-intercom
react-native link react-native-intercom
and added RNIntercom.xcodeproj
to the root of the project and linked libRNIntercom.a
into the Build Phases configuration.
When trying to build, the following error pops up:
In file included from {project_path}/node_modules/react-native-intercom/iOS/IntercomEventEmitter.m:9:
In file included from {project_path}/node_modules/react-native-intercom/iOS/IntercomEventEmitter.h:12:
../../react-native/React/Modules/RCTEventEmitter.h:8:9: fatal error: 'React/RCTBridge.h' file not found
#import <React/RCTBridge.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.
Any hint on how to fix this issue? Thanks in advance.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:8
- Comments:9
Top Results From Across the Web
`React/RCTBridgeModule.h` file not found - Stack Overflow
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:...
Read more >React Native: How to fixed RCTBridgeModule.h file not found
React Native: How to fixed RCTBridgeModule. h file not found. 19K views 3 years ago. AppSolution. AppSolution. 126 subscribers. Subscribe.
Read more >iOS : Build failed 'React/RCTBridgeModule.h' file not found
iOS : Build failed 'React/RCTBridgeModule. h ' file not found [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] iOS ...
Read more >[Solved]-`React/RCTBridgeModule.h` file not found-Reactjs
What happened was that Xcode was trying to build the react-native libraries in parallel and was building libraries with implicit react dependencies before ......
Read more >Fatal error: 'React/RCTBridgeModule.h' file not found
Hi Team, I am getting this error( fatal error: 'React/RCTBridgeModule.h' file not found #import “React/RCTBridgeModule.h”) while building ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@maxKimoby @misterpoloy I managed to build using a previous version of both
react-native-intercom
andintercom
itself after changing the Build settings of theRNIntercom
project on Xcode. I’m not sure if it can be done with current versions also, as I didn’t upgrade them after getting it to build properly.The steps I took was to point the Header Search Path to get the header files from the
Pods/Headers/Public/React
folder. Didn’t test for Android.I solved this by installing Intercom as a Cocoapod instead of relying on the pod within react-native-intercom (as it has the issue).
My fix was to add the same version of Intercom above the autolink in the Podfile: