简体   繁体   中英

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). 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. 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. Anyway, as suggested by jaytr0n, the code must be fixed to know how to handle this autonomously.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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