Push notification badge reset count

Automator21 picture Automator21 · Aug 6, 2013 · Viewed 12.9k times · Source

I'm using PushBot as my push notification service, my issue is how do I reset the badge count. I've search and read to use this line of code:

[[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];

The only way the badge count gets reset is if I quit the app from running on the mulit-task bar and launch the app again, any help is greatly appreciated. Thanks,

Answer

user529543 picture user529543 · Aug 6, 2013

Just make a button on your UI and on his action put the code line:

[[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];

It will reset it.

Take a look Here for some other implementations.