index.js 381 Bytes
Newer Older
Libin Lu's avatar
init  
Libin Lu committed
1 2 3
'use strict';

var React = require('react-native');
4
var {NativeModules} = React;
Libin Lu's avatar
init  
Libin Lu committed
5

6 7 8
var FIRMessaging = NativeModules.RNFIRMessaging;

console.log(NativeModules.RNFIRMessaging);
Libin Lu's avatar
init  
Libin Lu committed
9 10 11 12

class FCM {

    static getFCMToken() {
13
        return FIRMessaging.getFCMToken();
Libin Lu's avatar
init  
Libin Lu committed
14 15 16
    }

    static requestPermissions() {
17
        return FIRMessaging.requestPermissions();
Libin Lu's avatar
init  
Libin Lu committed
18 19 20 21 22
    }

}

module.exports = FCM;