@Claude31
My intention is to keep the badge number(the red circle with the number that appears in the right upper corner of the app icon when you have something new waiting for you) in sync with the number of notifications displayed in Notification Center.
For example: if on Notification Center there are 5 notifications then I want the badge to say 5, if the user removes 2, I want the badge number to say 3.
Regarding the Stackoverflow question, I am familiar with the "solution" described there. There it describes how you can find out if a single notification is cleared. I ran the code and is working, so when the user clears out a notification I can decrease the badge by 1.
So far so good, but my problem is when the user clears all notifications at once, then instead of userNotificationCenter getting called multiple times for each notifiication, it is not called at all, and this is my problem because I don't know how to set badge to 0 when the user takes this action.
Topic:
App & System Services
SubTopic:
Core OS
Tags: