React-native-fcm: Can this project be used with react-native-firebase?

Created on 28 Sep 2017  Â·  12Comments  Â·  Source: evollu/react-native-fcm

We're using react-native-fcm for Push Notifications and react-native-firebase for the Firebase Database. I'm receiving notifications on Android, but not on iOS. I've checked all the configuration etc and can't work out why it's not working. I'm wondering if there's an incompatibility with using both modules together? Our configuration is simply as specified in the instructions, without the addition of the Local Notifications support.

Most helpful comment

Yes we did end up using both.​

All 12 comments

can you install react-native-fcm with the example project and see if it works?

Okay trying that now. One question: I've only uploaded the APNs authentication key to Firebase, and no certificates because the Firebase docs indicate they're not required. Could that be the problem?

I'm started a README for the example project (based on total guesses!) as follows:

simple-fcm-client

iOS

Installation

  • yarn install
  • Overwrite ios/GoogleService-info.plist with your file
  • Change the _Bundle Identifier_ in Xcode project settings
  • Select your _Team_ for both targets (SimpleFcmClient and SimpleFcmClientTests)

When I run the app I get the following error:

2017-09-28 11:46:19.923 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: Cannot read property 'googleApiAvailability' of undefined
2017-09-28 11:46:19.963 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: Module AppRegistry is not a registered callable module (calling runApplication)

you only need APNs authentication key

Module AppRegistry is not a registered callable module did you kill old react-native package runner?

this might help?https://github.com/invertase/react-native-firebase/issues/201

Okay, I'm receiving notifications in the example app. I'll add react-native-firebase now and see if that breaks it.

I've added react-native-firebase and it still works, so they do appear to be compatible. Now I just need to work out why it's not working in my app :/

yeah let me know your findings

@aexmachina Did you end up using both? Considering doing this since react-native-fcm seems to handle notifications much better than RNfirebase.

Yes we did end up using both.​

[Android]

@aexmachina , may I know which version react-native-firebase & react-native-fcm are you using ?

Im using firebase-core:11.6.0 (also tried with 12.0.0) but when I implement also with react-native-fcm my project got red screen due to com.google.android.gms.internal.zzceh something about incompatible class..

@MrHazimAli I ended up implementing this as well. Currently works great with:

 "react-native-fcm": "^14.1.3",
 "react-native-firebase": "^3.2.7"

and com.google.firebase:firebase-core:11.8.0

Note that meanwhile RNfirebase v4 was released which supposedly handles push notifs much better.

Was this page helpful?
0 / 5 - 0 ratings