Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS: App Icon Badge Will Not Go Away

I've added a Local Notification into my app, but for some reason, the app installs with a "1" icon. Opening it and closing it doesn't seem to make it go away. I typed application.applicationIconBadgeNumber = 0; into the app delegate, and have localNotif.applicationIconBadgeNumber = 0; in my notification area. Does anyone know what I'm missing? Thank you!

like image 621
Henry F Avatar asked Jan 24 '12 04:01

Henry F


1 Answers

This should work. Place it in applicationDidFinishLaunching in your app delegate file (or anywhere else, but that's a good place to test).

[UIApplication sharedApplication].applicationIconBadgeNumber = 0;
like image 70
Michael Frederick Avatar answered Nov 13 '22 14:11

Michael Frederick