-(void)setNoti {
UILocalNotification *localNotification = [[UILocalNotification alloc] init];
localNotification.fireDate = [NSDate dateWithTimeIntervalSinceNow:60];
localNotification.alertBody = @"NOTI 1";
localNotification.timeZone = [NSTimeZone defaultTimeZone];
localNotification.applicationIconBadgeNumber = [[UIApplication sharedApplication] applicationIconBadgeNumber] + 1;
localNotification.repeatInterval = kCFCalendarUnitMinute;
NSDictionary *dict = @{@"nid":@"1"};
localNotification.userInfo = dict;
[[UIApplication sharedApplication]scheduleLocalNotification:localNotification];
}
Warum meine einfache UILocalNotification nicht feuert?Meine einfache UILocalNotification wird nicht ausgelöst
Drucken Sie den Wert von localNotification.fireDate kommt richtig oder nicht? – svrushal
Sie müssen [Anwendung cancelAllLocalNotifications] anfordern; weil die Benachrichtigung der erste Wert ist. – Rock