RCTPushNotificationManager.h:8:9: fatal error: 'React/RCTEventEmitter.h' file not found
See original GitHub issueHi there,
After manually linking react-native-push-notification as per the documentation I’ve found myself running into this issue on a freshly init
’d React Native project:
In file included from [...]/node_modules/react-native/Libraries/PushNotificationIOS/RCTPushNotificationManager.m:8:
[...]/node_modules/react-native/Libraries/PushNotificationIOS/RCTPushNotificationManager.h:8:9: fatal error: 'React/RCTEventEmitter.h' file not found
#import <React/RCTEventEmitter.h>
^~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Command Analyze failed with a nonzero exit code
Any ideas as to what might be causing this? I’ve seen the issue arise from a few other projects, along with a similar report from this project in this stack overflow question.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:7
Top Results From Across the Web
React/RCTEventEmitter.h file not found - Stack Overflow
The issue turns out to be that RCTPushNotification doesn't have the reference to React from Cocoapods file React since Expo manages React in...
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
Looks like this Stack Overflow question solves the issue.
The trick, as mentioned by Chris in the comments of the SO question is to add the following to your Podfile:
It looks like this might be something new to React .60; should these instructions perhaps be in the README?
I’ve spent some time on this and found out that after adding
pod 'React-RCTPushNotification', :path => '../node_modules/react-native/Libraries/PushNotificationIOS'
in the podfile as mentioned by stevenleeg, I also had to remove libRCTPushNotification.a from Link Binary With LibrariesMaybe someone else can confirm if this works for them as well?