My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

IOS Push Notification Not Received Using (FCM) in Device in React Native (0.62.0)

Agi Development's photo
Agi Development
·Oct 13, 2020·

1 min read

I'm working in react native (0.62.0). I'm stuck in React Native Push Notification (Using FCM).

Here are the steps i'm doing.

Get a Device Token from FCM. (npm install react-native-firebase) using this plugin.

import firebase from "react-native-firebase";

async getToken() {

let fcmToken = await AsyncStorage.getItem('fcmToken');  
console.log('TestA',fcmToken);
if (!fcmToken) {
  fcmToken = await firebase.messaging().getToken();
  console.log('FCM Token', 'fcmToken');
  if (fcmToken) {
    // user has a device token
    await AsyncStorage.setItem('fcmToken', fcmToken);
  }
}

}

IOS Device is not Receiving Push Notification.

Here Is Plugin: react-native-push-notification

react-native-fcm

I have Created All the Certification required for push notification App

Bundle id Push Notification (Development , Production Certificate, Auth Key).