ich einfach bin die Schaffung UILocalNotification
, ohne Terminplanung, nur aus Hintergrund mit dem folgenden Code:Userinfo von UILocalNotification immer nil
let n = UILocalNotification()
n.alertBody = "\(nam) \(wat)"
n.userInfo = ["id": id, "t":type.rawValue]
n.soundName = UILocalNotificationDefaultSoundName
n.category = "call_chat"
app.scheduleLocalNotification(n)
I userInfo
innen
func application(_ application: UIApplication, didReceive notification: UILocalNotification)
Bis hier ist alles fein. Aber ich muss später einige der Benachrichtigungen mit derselben ID ablehnen und neue erstellen. Wenn ich versuche, sie mit UIApplication.shared.scheduledLocalNotifications
zu bekommen, haben alle userInfo==nil
in iOS9 und userInfo==["":""]
in iOS10 Beta.