1

this question is asked in other several links like How to clear badge number while preserving notification center

My question is a little more specific.

I would like to clear the badge number when opening app but i want the notificaiton in the notification center to not be cleared.

The suggested answer in the link above is to set the badge number to -1:

[[UIApplication sharedApplication] setApplicationIconBadgeNumber:-1]

This works with iOS8? I'm trying without any success.

Thank you

Davide

Community
  • 1
  • 1
MajinDageta
  • 250
  • 3
  • 14
  • 1
    Make sure you are clearing the icon's badge number when the applicationDidBecomeActive method is called. – SierraMike Aug 27 '15 at 15:42
  • Hi @Sean , thank you for fast answer. I'm clearing the icon badge (setting it to -1) in the applicationDidBecomeActive. Unfortunatly this clears my notification center too. – MajinDageta Aug 27 '15 at 15:51

1 Answers1

1

As the doc says, the notification will be gone from notification area when you assign your badge count to 0. <0 will also cause to same effect.

Rohit Kumar
  • 877
  • 6
  • 20