React-native-fcm: RNFIRMessaging.h file not found

Created on 24 Jun 2016  路  18Comments  路  Source: evollu/react-native-fcm

After doing the pod install I get the error "RNFIRMessaging.h" file not found.

Most helpful comment

Hi Jon, I figured out my problem. Similar to what you do for PushNotificationsIOS RN API, you need to add '$(SRCROOT)/../node_modules/react-native-fcm/ios' to header search paths in build settings. That's what I was missing I hope they update the readme.

All 18 comments

If someone has the same problem, the solution is doing:

npm install

I'm still having trouble with this. Do I need to add the xcode project to the libraries folder and link in build phases?

I think I'm missing steps here but don't know what. I just get file not found every time.

I'm having this problem too. This is such a difficult library to get working. I've tried a fresh npm install, running and re-running Cocoapods, different combinations of the config file, nothing seems to work.

Hi Jon, I figured out my problem. Similar to what you do for PushNotificationsIOS RN API, you need to add '$(SRCROOT)/../node_modules/react-native-fcm/ios' to header search paths in build settings. That's what I was missing I hope they update the readme.

Wow thanks, that seems to work and has saved my day! I would never have figured that out, thank you so much.

Started a new project with RN 0.40.0 and found the same issue after following all instructions for installation. I think the documentation should be updated with this issue. Not sure if this happens for everyone creating new projects.

@cpsiaki thanks for the tip.

phew... It seems the react-native link command missed to add header search path...

@amanthegreatone, I can confirm I also had to add the header search path manually for a clean install with RN 0.40.

When you write
you need to add '$(SRCROOT)/../node_modules/react-native-fcm/ios' to header search paths in build settings.
I'm not a iOS developer. What does this mean? Do you have to open the project up in Xcode (which doesn't seem to be working for me) or can I just add this to some file?

It seems like these are the appropriate steps.

  1. Open ios directory in Xcode
  2. Click your project name on the left there.
  3. Click Building Settings. Click All.
  4. Scroll down to Header Search Paths.

@oliversisson You're correct, those are the steps, the quickest way to get XCode up and running is to open the ios folder in your app, and in there there should be a [myproject].xcworkspace file. Open that, and it should automatically open your project in XCode, and you can then navigate to the build settings, make the changes, then clean and build the project and run on any simulators or devices you need.

Although the source code of your app is written in React Native, the built XCode project is like any other iOS project so if you get stuck there are lots of general XCode tutorials out there to help with navigating around and getting things up and running.

Thanks @cpsiaki. I had the same issue and your suggestion fixed it for me too.

This issue should still be open no? Seems like the readme should be updated with these instructions or react-native link should do this step?

Any updates about @mypark said?

This is because of linking. Better solving by
react-native link react-native-fcm

None of these solutions seemed to fix the issue for me. However with my AppDelegate.m file opened in Xcode, on the right side under Target Membership I had MyProject and MyProjectTests both checked. Once I unchecked MyProjectTests the issue went away and my app was able to build

If you're archiving make sure you also add '$(SRCROOT)/../node_modules/react-native-fcm/ios' under Release.

hi but it did not solve my problem, any other idea?!

Was this page helpful?
0 / 5 - 0 ratings