Integrating Push Notifications using FCM

Recently, I integrated push notifications in my react native app using react-native-firebase. I came across many challenges during the process of integration to successful implementation, so I thought to share useful resources.

For setup :

Step 1: (For Android & iOS)

Installation FCM in your project. Blow link show you how to setup FCM in your required environment https://rnfirebase.io/docs/v5.x.x/installation/initial-setup After complete fcm installation choose your platform Android and iOS. If you choose first android then implement below all android steps sequential and then implement all iOS steps. Step 2: (For Android)

https://rnfirebase.io/docs/v5.x.x/installation/android

(For iOS)

https://rnfirebase.io/docs/v5.x.x/installation/ios Step 3: (For Android)

https://rnfirebase.io/docs/v5.x.x/messaging/android

(For iOS)

https://rnfirebase.io/docs/v5.x.x/messaging/ios Step 4:

(For Android)

https://rnfirebase.io/docs/v5.x.x/notifications/android

(For iOS)

https://rnfirebase.io/docs/v5.x.x/notifications/ios

I hope you can follow all the above steps perfectly.it is help you to setup Push-Notification environment. After completing all above setups we are implement Receive Push Notifications .Now let's code the most awaited part… Receiving Notifications! 😉

https://rnfirebase.io/docs/v5.x.x/notifications/receiving-notifications Now lets see how to use FCM (Firebase) for sending push-Notification

  1. Click on Add Project

  2. Select your platform. make sure package name is same as your Selected platform.

Example: (in android your package name is com.abc so in firebase your android package name is also com.abc) Now download config file and Make sure your google-services.json for (Android) and GoogleService-Info.plist for (iOS) are placed in correct folders.

  1. Add firebase SDK

  2. Run your app to verify installation (you can skip this step)

Now everything is done for sending Push-Notification.Let’s see its work fine or not? So, now select cloud messaging option it’s look like below

Last updated