evollu / react-native-fcm

react native module for firebase cloud messaging and local notification
MIT License
1.73k stars 681 forks source link

fatal error: module 'Firebase' not found, not using cocoapods #896

Open mokingguy opened 6 years ago

mokingguy commented 6 years ago

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

screen shot 2018-04-13 at 8 33 14 pm screen shot 2018-04-13 at 8 33 25 pm screen shot 2018-04-13 at 8 33 55 pm screen shot 2018-04-13 at 8 35 21 pm screen shot 2018-04-13 at 8 35 14 pm screen shot 2018-04-13 at 8 35 08 pm

screen shot 2018-04-13 at 8 39 28 pm

yarikgenza commented 6 years ago

Having the same issue :(

evollu commented 6 years ago

are you installing Firebase SDK manually or through cocapod?

mokingguy commented 6 years ago

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 notifications@github.com 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 .

evollu commented 6 years ago

ok have you compared with example under the no pod example?

mokingguy commented 6 years ago

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 notifications@github.com 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 .

evollu commented 6 years ago

can you provide a public repo with the issue so I can take a look

wincod75 commented 6 years ago

Following, having the same issue

mokingguy commented 6 years ago

I'd rather not share publicly the whole repo, is it possible the I could only share the ios project?

404sand808s commented 6 years ago

My default import in RNFIRMessaging.h was:

if __has_include()

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.

mokingguy commented 6 years ago

I did the same, I've tried all the variations suggested on #826 and none seemed to work

evollu commented 6 years ago

@mokingguy you can just create a new empty project with the issue.

inderpalaulakh commented 6 years ago

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

karlmosenbacher commented 6 years ago

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.

wincod75 commented 6 years ago

@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.

karlmosenbacher commented 6 years ago

@wincod75 I guess I could try using it. Thanks!

guillaumelachaud commented 6 years ago

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.

guillaumelachaud commented 6 years ago

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.

sschiang commented 5 years ago

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.

edritech93 commented 5 years ago

same, but I use version 16

edritech93 commented 5 years ago

Please help

dashko commented 4 years ago

Bump