How to remove application badge number without clearing the notification center

Hi,

I would like to remove the application badge number so I use the UIApplication.applicationIconBadgeNumber property. The thing is that when I set it to 0, it also removes all the apps's notifications from the notification center which I don't want.


This description of this method does not mention at all this behaviour and it causes an annoying bug in our application.


Is there a proper way for clearing only the app badge number?


cheers

There is no way to change the count to 0 without removing all the notifications along with it.


Per iOS documentation: https://developer.apple.com/ios/human-interface-guidelines/features/notifications/

"Keep badges up to date. Update your app’s badge as soon as the corresponding information is read. You don’t want people to think there’s new information available, only to find that they’ve already seen it. Note that reducing a badge’s count to zero removes all related notifications from Notification Center."


Hope this helps,

DT

How to remove application badge number without clearing the notification center
 
 
Q