I'm a react-native newbee, trying to build an app which will receive notifications from an app server. The flow will be like this: App server -> FCM Cloud -> App client(android or ios).
I've started with [1] and I'm trying to generate and get a device token to be sent to the app server for identification. However I'm getting an error:
import * as firebase from 'firebase';
const defaultAppConfig = {
...
};
var defaultApp = firebase.initializeApp(defaultAppConfig);
var defaultMessaging = firebase.messaging(); // -> here, messaging not found
Can someone help me figure out how to get a reference to the cloud messaging object, and get that token, eventually?
[1] https://facebook.github.io/react-native/docs/getting-started.html