首页 > 解决方案 > 无法连接到 Firebase

问题描述

我在我的科尔多瓦应用程序中使用 phonegap-plugin-push 来接收来自 firebase 的推送通知:

PushNotification.init({
    android: {
        iconColor: "#ffb800",
        senderID: "725892xxxxxx"
    },
    ios: {
        "sound": true,
        "vibration": true,
        "badge": true
    },
    windows: {}
});

当我启动应用程序时,我收到以下错误消息:

ERROR: Couldn't connect to firebase

在 PushNotification.init 语句中。有谁知道可能导致此错误的原因?

提前致谢!

标签: cordovafirebasefirebase-cloud-messaging

解决方案


我能够通过将插件降级到 config.xml 中的 2.0.0 版本来解决这个问题。


推荐阅读