Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove the cancel ApplicationIconBadgeNumber from LocalNotification?

I am using LocalNotification in my app. It is working fine but once ApplicationIconBadgeNumber is set, not able to remove it from App. How to remove it?

like image 359
Sezhian Avatar asked Dec 28 '22 22:12

Sezhian


1 Answers

You need to set the application applicationIconBadgeNumber. For example in the application didReceiveLocalNotification.

- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notif {
    application.applicationIconBadgeNumber = notif.applicationIconBadgeNumber-1;
}
like image 177
rckoenes Avatar answered Dec 30 '22 11:12

rckoenes