【问题标题】:Ionic ios push: Unable to find token in cache Error Domain=com.google.iid Code=-25300 "(null)"Ionic ios push:无法在缓存中找到令牌错误域=com.google.iid 代码=-25300“(空)”
【发布时间】:2016-03-01 03:05:08
【问题描述】:

我正在尝试为 ios 设置推送通知,我正在使用 ionic 和 phonegap-push-plugin。

这是会议:

var conf = {
        android: {
          senderID: "********************",
          "icon": "icon",
          "iconColor": "black"
        },
        ios: {
          gcmSandbox: true,
          senderID: "********************",
          alert: "true",
          badge: false,
          sound: 'false'
        },
        windows: {}
      };

我的 iphone 5 出现下一个错误:

2016-02-29 23:42:48.351 MDZOL[466:82778] active
2016-02-29 23:42:48.352 MDZOL[466:82778] PushPlugin skip clear badge
2016-02-29 23:42:48.696 MDZOL[466:82778] Resetting plugins due to page load.
2016-02-29 23:42:51.292 MDZOL[466:82778] Finished load of: file:///var/mobile/Containers/Bundle/Application/CFB8C8D3-FD5D-4710-A1FA-7480F82708D0/MDZOL.app/www/index.html#/tab/home
2016-02-29 23:42:51.820 MDZOL[466:82778] Ionic Core: plugins are ready
2016-02-29 23:42:51.829 MDZOL[466:82820] Push Plugin register called
2016-02-29 23:42:51.829 MDZOL[466:82820] PushPlugin.register: setting badge to false
2016-02-29 23:42:51.829 MDZOL[466:82820] PushPlugin.register: clear badge is set to 0
2016-02-29 23:42:51.830 MDZOL[466:82820] PushPlugin.register: better button setup
2016-02-29 23:42:51.830 MDZOL[466:82820] GCM Sender ID **************
2016-02-29 23:42:51.830 MDZOL[466:82820] Using GCM Notification
2016-02-29 23:42:51.831 MDZOL[466:82820] Using GCM Sandbox
2016-02-29 23:42:51.845 MDZOL[466:82778] Push Plugin register success: <dc52fb00 0aac3a80 7eac3d06 aeae102c ef905958 512c9252 937c6f7e dee26593>
2016-02-29 23:42:51.977: GGLInstanceID | Unable to find token in cache Error Domain=com.google.iid Code=-25300 "(null)"
2016-02-29 23:42:52.788 MDZOL[466:82778] Registration to GCM failed with error: The operation couldn’t be completed. (com.google.HTTPStatus error 401.)
2016-02-29 23:42:53.412 MDZOL[466:82778] Error
2016-02-29 23:42:53.413 MDZOL[466:82778] {"line":57,"column":54,"sourceURL":"file:///var/mobile/Containers/Bundle/Application/CFB8C8D3-FD5D-4710-A1FA-7480F82708D0/MDZOL.app/www/plugins/phonegap-plugin-push/www/push.js"}

我不使用 swift 所以,这个堆栈不适合我的问题:GCM in Swift Bundle ID Error

提前致谢。

【问题讨论】:

    标签: ios push-notification ionic-framework


    【解决方案1】:

    我遇到了这个问题,我通过使用这个魔术链接将 .p12 文件添加到 GCM 来解决它:https://developers.google.com/mobile/add

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-03-02
      • 2017-03-20
      • 2017-01-02
      • 2016-12-18
      • 1970-01-01
      相关资源
      最近更新 更多