我正在开发Ionic应用程序,并使用phonegap推送建立推送通知。我想在iOS系统中,当应用程序在前景时显示横幅。(我可以用'forcehow'选项在前景显示横幅 -- Android)
任何例子或建议都将是感激的.(即一个如何在通知事件上操纵视图的例子)谢谢你。
对我来说,它的工作与此payload。
{
"registration_ids":["device token"],
"content_available": true,
"notification" : {
"force-start": "1",
"content-available": "1",
"no-cache": "1",
"body":"Test" ,
"title" : "Test",
"sound" : "default" ,
"icon":"default",
"badge": 5
},
"priority":10
}
只有当你想在你的应用程序图标上显示数字时才使用徽章。