hallo alle zusammen,
ich habe bislang einen swift 2 code gehabt, welcher mir zwei local notifications registriert.
nun habe ich meinen code etwas optimieren wollen - das hat auch soweit alles gut geklappt - allerdings wird jetzt nur ein local notification registiert.
hier mein code:
Alles anzeigen
habe testweise "prints" hinzugefügt um die Werte zu checken.
wenn der o.g. Code duchgelaufen ist, habe ich folgendes in der Konsole stehen:
wenn ich mir dann alle LocalNotifications anschauen möchte mit:
allerdings zeigt die Ausgabe dann nur folgendes an:
Sehe gerade den Wald vor lauter Bäumen nicht mehr. sieht jemand den Fehler?
ich habe bislang einen swift 2 code gehabt, welcher mir zwei local notifications registriert.
nun habe ich meinen code etwas optimieren wollen - das hat auch soweit alles gut geklappt - allerdings wird jetzt nur ein local notification registiert.
hier mein code:
Quellcode
- localNotification.userInfo = ["UUID": SecondReminderString!, ]
- print(localNotification.userInfo)
- localNotification.fireDate = FirstLN
- print(localNotification.fireDate)
- localNotification.alertBody = "Hier kommt der Text"
- localNotification.soundName = UILocalNotificationDefaultSoundName
- localNotification.timeZone = NSTimeZone.defaultTimeZone()
- localNotification.applicationIconBadgeNumber = UIApplication.sharedApplication().applicationIconBadgeNumber + 1
- UIApplication.sharedApplication().scheduleLocalNotification(localNotification)
- }
- localNotification.userInfo = ["UUID": FirstReminderString, ]
- print(localNotification.userInfo)
- localNotification.fireDate = SameDay
- print(localNotification.fireDate)
- localNotification.alertBody = "Hier kommt der Text"
- localNotification.soundName = UILocalNotificationDefaultSoundName
- localNotification.timeZone = NSTimeZone.defaultTimeZone()
- localNotification.applicationIconBadgeNumber = UIApplication.sharedApplication().applicationIconBadgeNumber + 1
- UIApplication.sharedApplication().scheduleLocalNotification(localNotification)
habe testweise "prints" hinzugefügt um die Werte zu checken.
wenn der o.g. Code duchgelaufen ist, habe ich folgendes in der Konsole stehen:
wenn ich mir dann alle LocalNotifications anschauen möchte mit:
allerdings zeigt die Ausgabe dann nur folgendes an:
Quellcode
- Optional([<UIConcreteLocalNotification: 0x14cea9b90>{fire date = Samstag, 31. Oktober 2015 um 10:00:00 Mitteleuropäische Normalzeit, time zone = Europe/Berlin (MEZ) offset 3600, repeat interval = 0, repeat count = UILocalNotificationInfiniteRepeatCount, next fire date = Samstag, 31. Oktober 2015 um 10:00:00 Mitteleuropäische Normalzeit, user info = {
- UUID = EOiP4toFLi;
- }}])
Sehe gerade den Wald vor lauter Bäumen nicht mehr. sieht jemand den Fehler?
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von Ghost108 ()