iOS 10 UNNotificationAction Open App from Background
A Swift 3/4 example (because I did not know how to set this option): important are the UNNotificationActionOptions
of the UNNotificationAction
.
let myAction = UNNotificationAction(identifier: "myActionIdentifier", title: "MyAction", options: [.foreground])
Ok i have found the solution. We have to set UNNotificationActionOptions :)
UNNotificationActionOptions.foreground