react-native-fcm: module 'FirebaseCore' not found on 11.0.1

RN 0.51, RN-FCM 11.0.1

tried downloading new firebase libraries and replacing old ones in pods, clearing everything (xcode, node_modules, xcode derived data), relinking with reac-native-link nothing works

Note that I don’t use cocoapods

Still give’s me:

node_modules/react-native-fcm/ios/RNFIRMessaging.h: Analyzer skipped this file due to parse errors

node_modules/react-native-fcm/ios/RNFIRMessaging.h:4:9: fatal error: module 'FirebaseCore' not found

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 2
  • Comments: 28 (10 by maintainers)

Most upvoted comments

@drailanjohngss I did this instead of manual linking:

  1. move Podfile into a different directory
  2. npm install --save react-native-fcm
  3. react-native link react-native-fcm 2b. move Podfile back into the ios folder
  4. add only this to my podfile:
    pod 'FirebaseMessaging'
  1. Run pod install

and you’re done

@Stettinum

  pod 'Firebase/Core', '4.0.0'
  pod 'Firebase/Messaging'

worked for me

@drailanjohngss, if you are using newest version of react-native-fcm try to add 4.0 version of firebase core:

pod 'Firebase/Core', '4.0.0' this do the trick for me… my cofig:

  pod 'Firebase/Core', '4.0.0'
  pod 'Firebase/Messaging'
  pod 'react-native-fcm', :path => '../node_modules/react-native-fcm'

if it still does not work, please do that trick:

#import <FirebaseCore/FirebaseCore.h>
//import FirebaseCore;
#import <FirebaseMessaging/FirebaseMessaging.h>
//import FirebaseMessaging;
//import FirebaseInstanceID;
#import <FirebaseInstanceID/FirebaseInstanceID.h>

in RNFIRMessaging.h

@evollu I created a very simple example app that fails to build, with react native 0.51.0 and react-native-fcm 11.2.0 https://github.com/Bernhard---H/fcmTestApp

@drailanjohngss I’m new to app development in general, so no idea what went wrong - maybe someone else can help?

update: I found this though: https://github.com/google/google-toolbox-for-mac/issues/137#issuecomment-314012109

I reverted to v10.0.3

just updated the readme