0

Possible Duplicate:
iOS application: how to clear notifications?

I want to clear notifications for my app from the notification center, according to Apple's release notes for iOS5

http://developer.apple.com/library/ios/#releasenotes/General/RN-iOSSDK-5_0/_index.html

they say:

"Notification Center displays notifications that are considered "unread.” To accommodate push and local notifications that have no unread status, set your application’s badge count to 0 to clear that app’s notifications from Notification Center."

I am calling this in my app

application.applicationIconBadgeNumber = 0; 

but the notifications do not get removed from the notification center.

How to remove them?

Community
  • 1
  • 1
Gruntcakes
  • 37,738
  • 44
  • 184
  • 378
  • I believe that just removes the badge number from the icon itself. – Matt Hudson May 18 '12 at 21:29
  • have you tried [this solution](http://stackoverflow.com/a/9225972/119114) ? – Nate May 18 '12 at 21:48
  • No, because 1) that calls cancelAllLocalNotifications and this is for remote notifications. 2) What if there are several outstanding local notifications, wouldn't cancelAllLocalNotifications delete the ones that haven't fired yet and thus haven't yet appeared in the notification center, so these would be lost (without re-posting them, which is a nuisance) – Gruntcakes May 18 '12 at 23:05

0 Answers0