Firebase Cloud Messaging (FCM):
Firebase Cloud Messaging is a cloud solution for messages on iOS, Android, and web applications. It allows you to send messages to devices in a reliable, efficient, and scalable way. This can include messages to single devices, groups of devices, or devices subscribed to topics.
Firebase Analytics:
Firebase Analytics helps you understand how users interact with your app. It provides insights into user behavior, user engagement, and more.
Firebase Crashlytics:
Firebase Crashlytics helps you track and diagnose crashes in your application, providing insights into why they occurred.
Installation:
Analytics, Cloud messaging, Crashlytics, React Native Permissions
yarn add @react-native-firebase/app @react-native-firebase/analytics @react-native-firebase/messaging @react-native-firebase/crashlytics react-native-permissions @notifee/react-native && cd ios && pod install
or
npm i @react-native-firebase/app && @react-native-firebase/analytics && @react-native-firebase/messaging && @react-native-firebase/crashlytics && react-native-permissions && @notifee/react-native && cd ios && pod install
Run
pod install --repo-update
ifpod install
fails.
New Project Setup in Firebase:
Go to the Firebase console to create a new project. Follow the prompts and modify them according to your needs. A new Firebase project can be initiated with three simple steps illustrated in the Firebase screenshots below.
The final step is to select a Google Analytics account to be linked with the project, select settings, and accept the terms. Then, click ‘create project.’
Register Your Application on Firebase Android
In the Firebase dashboard, register your Android application.
Android Native Configuration:
a) In android/build.gradle:
b) In android/app/build.gradle:
c) In main/AndroidManifest.xml:
Register Your Application on Firebase iOS
In the Firebase dashboard, register your iOS application.
Then Follow these steps:
https://rnfirebase.io/messaging/usage/ios-setup
iOS Native Configuration:
Enabling server key from firebase dashboard:
Add firebase.json
configuration in root-level directory:
You can refer firebase_json_temp.js to change boolean value as per requirement.
USAGE [ref:]
Notifee Usage in ReactNative->
Note: You can test cloud messaging on this site also