react-native-fcm
react-native-fcm copied to clipboard
fatal error: module 'Firebase' not found, not using cocoapods
I'm running this versions of RN and RNFCM
"react-native": "0.50.3",
"react-native-fcm": "^14.1.3",
I'm getting an error on build saying It can't find the Firebase module, I've added the Firebase manually and linked the library manually also.
I've added firebase.h
, module.modulemap
. Added the user headers, Header and framework search paths, Also I've added the the library to the build phase
I've also read #826 and followed some solutions there and didn't work.
Here are some screenshots that might be useful
Having the same issue :(
are you installing Firebase SDK manually or through cocapod?
Manually, for some reason installed an ancient version of react when I ran pods, even though React is not on the podfile.
On Sun, Apr 15, 2018, 5:56 PM Libin Lu [email protected] wrote:
are you installing Firebase SDK manually or through cocapod?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/evollu/react-native-fcm/issues/896#issuecomment-381444849, or mute the thread https://github.com/notifications/unsubscribe-auth/AIE8gUV-V3MN7XoqoZuJ_lk7x-_2yScYks5to9AtgaJpZM4TU4UE .
ok have you compared with example under the no pod example?
I have, every thing seems to be the same, I followed the no-pod instructions to the letter, downloaded the sdk, imported the frameworks, added the map and firebase.h, added the library project, as per react-native instructions and everything.
There's something that I've might missed, that could explain this?.
On Sun, Apr 15, 2018, 6:01 PM Libin Lu [email protected] wrote:
ok have you compared with example under the no pod example https://github.com/evollu/react-native-fcm/tree/no-pod/Examples/simple-fcm-client ?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/evollu/react-native-fcm/issues/896#issuecomment-381445163, or mute the thread https://github.com/notifications/unsubscribe-auth/AIE8gWmUSuoTOOG0tyQ_scDqst1ADVMMks5to9FYgaJpZM4TU4UE .
can you provide a public repo with the issue so I can take a look
Following, having the same issue
I'd rather not share publicly the whole repo, is it possible the I could only share the ios project?
My default import in RNFIRMessaging.h was:
#if __has_include(<Firebase.h>) #import <FirebaseCore/FirebaseCore.h> #import <FirebaseMessaging/FirebaseMessaging.h> #import <FirebaseInstanceID/FirebaseInstanceID.h> #else @import Firebase; #endif
I modified it to:
#import <FirebaseCore/FirebaseCore.h> #import <FirebaseMessaging/FirebaseMessaging.h> #import <FirebaseInstanceID/FirebaseInstanceID.h>
Now it seems to be working fine.
I did the same, I've tried all the variations suggested on #826 and none seemed to work
@mokingguy you can just create a new empty project with the issue.
I was getting same problem. In my case issue was, I added group name Firebase inside project. Firebase includes Firebase.h + module.modulemap + .frameworks. I got same error and to fix, I modified RNFIRMessaging.xcodeproj search paths to points to Firebase (by default it says framework). This was local fix and not going to work when you get package again. So I renamed Firebase to Frameworks and it works without any changes to RNFIRMessaging.xcodeproj
I am using react-native-fcm": 14.1.4 and also getting this module 'Firebase' not found error. Feels like I have done everything and I have no idea what to do next.
@karlmosenbacher This is not an answer, but I ended up using RNFB plugin over fcm because I could not find a solution to this issue.
@wincod75 I guess I could try using it. Thanks!
Last version I can use successfully is 12.0.0. Looking at the commit history on RNFIRMessaging.h
, it looks like the import changed quite frequently over the various releases but I can't find any that works for me when not using CocoaPods.
Nevermind it actually works for me on 15.0.2, out-of-the-box, with Firebase SDK 5.1.0 and no CocoaPods. Make sure you have the frameworks in ios/Frameworks
, make sure they are added inside of Xcode and that they have the right Target Membership. Also make sure Firebase.h and module.modulemap are in the same folder and also added to Xcode. It should then work without any sort of modification to RNFIRMessaging.h
or RNFIRMessaging.xcodeproj
.
What worked for me was adding ".../ios" directory to the user header search paths. Apparently what happens when you drag and drop into the Frameworks in xcode is that it is added to ".../ios", not ".../ios/Frameworks". It's a bit confusing, but makes sense-- so either create the directory or add to user header paths.
same, but I use version 16
Please help
Bump