我在Cordova上安装并配置了PushPlugin:https://github.com/phonegap-build/PushPlugin .

在Android上一切正常:

  • Cordova PushNOtification插件演示

  • 收到Deviceready事件

  • 注册android

  • 成功:好的

  • EVENT - > RECEIVED:注册 - >令牌 . . .

在iOS上我得到了这个(没有错误):

  • Cordova PushNOtification插件演示

  • 收到Deviceready事件

  • 注册iOS

好像没有调用以下函数,然后我没有得到令牌:

function tokenHandler (result) {
// Your iOS push server needs to know the token before it can push to this device
// here is where you might want to send it the token for later use.
alert('device token = ' + result);
}

也许我应该在苹果推送通知授权的某个地方实施?

谢谢