【问题标题】:I didn't receive push notification on iPhone using cordova plugin我没有在 iPhone 上使用 cordova 插件收到推送通知
【发布时间】:2016-09-21 23:58:33
【问题描述】:
我在我的应用程序中集成了cordova插件phonegap-plugin-push“PushPlugin”,但是在我发送通知后,我没有收到警报、徽章或声音,什么都没有。
注册成功,因为正确给出了令牌。
我还生成了推送证书(Apple Development IOS Push Services)并以 p12 格式导出。
在 Xcode 上,我设置了推送通知按钮。
有人可以帮助我吗?
提前谢谢你。
【问题讨论】:
标签:
xcode
cordova
plugins
push-notification
hybrid-mobile-app
【解决方案1】:
您的错误有两种情况。
-
当你打电话给Push.Init时,有什么东西不见了。下面的例子是我自己的。
Push.init({
ios: {
senderID: "XXXXXXXXXX",
gcmSandbox: true,
alert: true,
badge: true,
sound: true
}
}
在https://developers.google.com/mobile/add,你必须添加平台ios并在google控制台的ios项目中注册你的.p12证书。