ScheduleLocalNotification does not call didReceiveLocalNotification

I use UILocalNotification

The problem is that when I use scheduleLocalNotificationto publish my notification, it never starts didReceiveLocalNotification, but presentLocalNotificationNowdoes it every time.

I need to show a warning in didReceiveLocalNotification, but with scheduleLocalNotification and not presentLocalNotificationNow.

Has anyone experienced the same issue?

+4
source share
1 answer

In the local and remote notification programming guide:

iOS 8 , , . , . , , - , .

, , Apple:

UIUserNotificationType types = UIUserNotificationTypeBadge |
         UIUserNotificationTypeSound | UIUserNotificationTypeAlert;

UIUserNotificationSettings * mySettings =           [UIUserNotificationSettings settingsForTypes: types categories: nil];

[[UIApplication sharedApplication] registerUserNotificationSettings: mySettings];

0

All Articles