如何在React IOS中接收Firebase推送通知?

时间:2018-09-26 05:03:58

标签: react-native push-notification apple-push-notifications firebase-cloud-messaging

有没有办法在IOS中接收推送通知有效载荷?在android中,它是通过以下方式实现的:

firebase.messaging().onMessage((message: RemoteMessage) => {
   // Process your message as required
});

但是它在ios中不起作用。它尝试过:

firebase.notifications().displayNotification((notification) => {
    console.log(notification);
});

firebase.notifications().onNotification((notification) => {
    console.log(notification);
});

仍然没有任何效果。谢谢

1 个答案:

答案 0 :(得分:0)

没关系,我这样称呼它:

/etc/apt/sources.list.d