I'm not sure what I changed in my app, but Im not able to clear the badges number anymore.
I put code the following code:
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];
in:
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
I also tried:
application.applicationIconBadgeNumber = 0;
It just wont work, even though it did before, please advice
full code:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
[[UINavigationBar appearance] setTintColor:[UIColor blackColor]];
//Let the device know we want to receive push notifications
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:
(UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeBadge)];
NSLog(@"didFinishLaunchingWithOptions");
//application.applicationIconBadgeNumber = 0;
//[[UIApplication sharedApplication] setApplicationIconBadgeNumber:-1];
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];
return YES;
}