wie Sie eine lokale Benachrichtigung direkt von WatchKit senden? Ist es überhaupt möglich? Die Apple Dokumentation besagt, dass die lokale Benachrichtigung, die von Watch geplant wird, direkt zur Watch geleitet wird. Es scheint also, dass es einen Weg dafür geben muss.Lokale Benachrichtigung in WatchKit
In iOS würde ich tun:
Aber gemeinsame Anwendung von Watch ist nicht möglich ....
UILocalNotification *notification = [[UILocalNotification alloc] init];
notification.fireDate = [NSDate dateWithTimeIntervalSinceNow:7];
notification.alertBody = @"This is local notification!";
notification.timeZone = [NSTimeZone defaultTimeZone];
notification.soundName = UILocalNotificationDefaultSoundName;
notification.applicationIconBadgeNumber = 10;
NSDictionary *infoDict = [NSDictionary dictionaryWithObject:@"Hello! This is Local Notification!" forKey:@"Notification"];
notification.userInfo = infoDict;
[[UIApplication sharedApplication] scheduleLocalNotification:notification];
Verwenden Sie das 'UserNotifications' Framework – dan