I am using UILocalNotification in my project. My code is:
UILocalNotification *notification = [[UILocalNotification alloc] init];
notification.fireDate = event.date;
notification.timeZone = [NSTimeZone systemTimeZone];
notification.hasAction = YES;
notification.soundName = UILocalNotificationDefaultSoundName;
[notification setApplicationIconBadgeNumber:[UIApplication sharedApplication].applicationIconBadgeNumber+1];
notification.alertBody = @"test alert body";
notification.repeatInterval = NSDayCalendarUnit;
NSLog(@"SCHEDULED NOTIFICATION = %@", notification);
[[UIApplication sharedApplication] scheduleLocalNotification:notification];
At the time of the notification, nothing happens, but the icon icon of the application icon gets +1. For iOS6, it works fine. Where could the problem be?
UPDATE I do not receive any notification notifications while my application is running and when it is closed. The number of the icon. They are changing.
source
share