iOS app badge persists

ios, iphone, local, notifications

Solution

Try

[[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];

after you have processed your notification.

Problem

I have an iPhone app which uses local notification. It is working almost perfectly, although I have a little problem: The red balloon (app badge) from notification doesn't dismiss when I launch the app. What can I do to fix it? I've already deleted the app from iPhone, but when I compile it again with Xcode, I comes back again.

Original source