简体   繁体   English

Apple Push Notifications-删除徽章但不删除通知文本

[英]Apple Push Notifications - Remove Badge But Not Notification Text

We have a requirement in our iOS5/6 app to remove the badge number from our app icon, but leave the notification text in the notification center. 我们在iOS5 / 6应用中要求从应用图标中删除徽章编号,但将通知文本保留在通知中心中。 Setting the badge number to 0 clears out the notification text as well. 将徽章编号设置为0也会清除通知文本。

Our potential solution is to set the badge number to -1, which seems to do exactly what we are looking for. 我们可能的解决方案是将徽章编号设置为-1,这似乎完全符合我们的期望。 Does anyone else have any experience with doing this? 其他人有这样做的经验吗?

当您打开应用程序并将应用程序标志设置为0时,将清除通知中心的所有通知。

This works as expected in iOS 5 and 6.0. 这可以在iOS 5和6.0中按预期工作。 We are able to remove the badge icon, but not the notification text by setting the badge number to -1. 通过将徽章编号设置为-1,我们可以删除徽章图标,但不能删除通知文本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM