I want to clear the applicationIconBadgeNumber
and keep the notification in the notification center for iOS 8 ~ 11.
I have tried the code in the applicationDidBecomeActive
:
UILocalNotification *notif = [[UILocalNotification alloc] init];
notif.applicationIconBadgeNumber = -1;
[[UIApplication sharedApplication] scheduleLocalNotification:notif];
It works at the beginning but when I try more times, I can receive the UILocalNotification but cant change the
applicationIconBadgeNumber`.
Are there any other solutions or is my usage is wrong?