FCM Fallback error: Default FirebaseApp is not initialized
Closed this issue · 1 comments
franciscohanna92 commented
I'm trying to configure the FCM fallback delivery following the steps in this guide.
However, as soon as I open the application I get the following error:
Default FirebaseApp is not initialized in this process com.staffcom.mobile. Make sure to call FirebaseApp.initializeApp(Context) first.
Project dependencies:
"expo": "^51.0.17",
"pushy-react-native": "^1.0.40",
"react-native": "0.74.2",
Am I missing some step that is not documented to make the FCM fallback work in React Native?
pushy commented
Hi @franciscohanna92,
Thanks for reaching out. We'd be glad to assist.
You will need to follow all instructions under Option 1 in the Firebase docs to resolve this issue:
https://firebase.google.com/docs/android/setup#console
Most importantly, you will need to include google-services.json
and add the following to the app-level build.gradle
:
apply plugin: 'com.android.application'
// Add the following line:
apply plugin: 'com.google.gms.google-services' // Google Services plugin
Please give it a try, and let us know if you face any issues.