Я использую UILocalNotification в своем проекте. Мой код:UILocalNotification не отображается в iOS7
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];
Вовремя, когда появляется уведомление, ничего не происходит, но значение значка значка приложения получает +1. Для iOS6 это работает нормально. Где может быть проблема?
UPDATE Я не получаю уведомления об уведомлении в то время как мое приложение запускается и когда она закрыта. Номер значка Они меняется.
Пожалуйста, проверьте фоновый режим ... – Deepesh
см. Так ответ http://stackoverflow.com/questions/13081210/uilocalnotification -click-event? rq = 1 – Deepesh
Вы получаете обратный вызов в методе didReceiveLocalNotification? – thatzprem