【问题标题】:Firebase messaging shows 0 messages sentFirebase 消息显示已发送 0 条消息
【发布时间】:2017-03-01 23:57:21
【问题描述】:

我正在使用我的 ios react 本机应用程序测试我的 firebase 消息传递实现,并通过 firebase 仪表板发送通知 - 但它显示已发送 0 条消息。我正在使用这个库及其示例代码:

https://github.com/evollu/react-native-fcm

我已尝试直接放入 firebase 消息令牌以向我的单个测试设备发送消息,但这也发送了 0 条消息。

如何调试 Firebase 中发生的事情?我可以在某处看到已注册设备的列表吗?我已经在 Apple 和 Firebase 上配置了 APN 证书,所以不知道下一步该去哪里。

我在我的应用中获得了一个 firebase 令牌,因此不确定是否还有其他需要做的事情。

class App extends Component {
    componentDidMount() {
        FCM.requestPermissions(); // for iOS
        FCM.getFCMToken().then(token => {
            saveTokenToMyProfile(token);
        });
        this.notificationListener = FCM.on(FCMEvent.Notification, async (notif) => {
            // there are two parts of notif. notif.notification contains the notification payload, notif.data contains data payload

            if(notif.opened_from_tray){
              //app is open/resumed because user clicked banner
            }

        this.refreshTokenListener = FCM.on(FCMEvent.RefreshToken, (token) => {
            console.log(token)
            // fcm token may not be available on first load, catch it here
        });
    }

【问题讨论】:

    标签: firebase react-native firebase-cloud-messaging


    【解决方案1】:

    Firebase 通知在计算发送计数时遇到延迟。
    这应该不会影响实际的消息传递

    https://status.firebase.google.com/

    我们在计算发送的 Firebase 通知时遇到延迟 从美国/太平洋 2017 年 2 月 28 日星期二上午 8:30 开始计算。

    当前数据表明所有用户都受到此问题的影响。

    对于所有受影响的人,对于给您带来的任何不便,我们深表歉意 可能正在经历。我们将在美国/太平洋时间凌晨 02:25 之前提供更新 包含当前详细信息。

    【讨论】: