I'm developing a reminder app. I'm using local notification. It is working fine. But a badge number is always showing on top of my app's icon. How can I remove the badge number after firing the local notification? When I put [UIApplication sharedApplication].applicationIconBadgeNumber = 0;
in did finish launching, the badge number is completely removed.
I guess that you are trying to remove the badgeNumber
from the badge icon and show only an empty(without any number) badge icon.
You can not just remove the badge number alone from the badge icon. If you set applicationIconBadgeNumber
to 0
, the badge icon itself will be removed from the application icon.
If the badge to be shown then there should be a number, not a 0
. 0
is inteneted to remove the badge icon.
Whenever The Notification Fired In App delegate didReceiveLocalNotification Method Fired You Can Decrease The Count By One And Add One When You Add New Notification.
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification {
[UIApplication sharedApplication].applicationIconBadgeNumber=application.applicationIconBadgeNumber-1;
}
Cheers
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With