FireBase
1,APNSを登録する
2,FCMを登録する
3,react-native Fire base
4.sendbird
5,デバイストークン取得 sendbird
6,Routeからの一連の流れの実装
デバイストークンの取得
const sb = SendBird.getInstance();
if (Platform.OS === 'ios') {
firebase.messaging().ios.getAPNSToken()
.then(token => {
sb.registerAPNSPushTokenForCurrentUser(token, function(response, error) {
// Do something in response to a successful registeration.
});
})
.catch(error => {
});
} else {
firebase.messaging().getToken()
.then(token => {
sb.registerGCMPushTokenForCurrentUser(token, function(response, error) {
// Do something in response to a successful registeration.
});
})
.catch(error => {
});
}
FIREBASE React-native 受信
ReactNative FireBase