简体   繁体   English

如何在iOS应用程序上使用PushWoosh重置推送通知徽章计数器

[英]How to reset push notification badge counter with PushWoosh on an iOS app

I sent a push notification to my users with PushWoosh, and manually set the badge counter to "1" (in the Advanced form). 我使用PushWoosh向用户发送了推送通知,并手动将徽章计数器设置为“1”(在“高级”表单中)。 Now the problem is the badge counter is stuck on "1" no matter if the user opened the app or even clicked the notification they got. 现在的问题是,无论用户是打开应用程序还是点击了他们获得的通知,徽章计数器都会卡在“1”上。 This badge counter is very annoying to my users, so I need to find a solution as soon as possible. 这个徽章计数器对我的用户来说非常烦人,所以我需要尽快找到解决方案。

What can I do to reset it and make it disappear? 我该怎么做才能重置它并让它消失?

当置于applicationDidFinishLaunching时,无论推送供应商如何,都应该重置徽章

[UIApplication sharedApplication].applicationIconBadgeNumber = 0;

Apparently sending another Advanced push, and putting "0" in the "Badges" field reset the counter and the problem is now solved. 显然发送另一个高级推送,并在“徽章”字段中放置“0”重置计数器,现在问题已解决。 Anyway, as suggested by jaytr0n, the code must be fixed to know how to handle this autonomously. 无论如何,正如jaytr0n所建议的那样,必须修复代码以了解如何自动处理这个问题。

http://i.stack.imgur.com/IclCv.jpg http://i.stack.imgur.com/IclCv.jpg

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

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