Can I programmatically clear my app’s notifications from the iOS 5 Notification Center?

To remove notifications from the Notification Center simply set your icon badge number to zero.

[[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];

This only works if the number changes, so if your app doesn’t use the badge number you have to first set, then reset it.

[[UIApplication sharedApplication] setApplicationIconBadgeNumber:1];
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];

Leave a Comment