How to handle new iOS10 Notification Action when app is closed (not in background) ?
when app is minimalized everything works fine with:
UNUserNotificationCenter.current().delegate = x
and handling it in
class x: UNUserNotificationCenterDelegate {
func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Swift.Void) {
}
}
but nothing is called when app is closed and user tap action in notification... maybe i can't handle background task and i always have to launch app?
"Tapping a button launches your app (either in the foreground or background) and gives you a chance ... " These lines appear in the doc for UIUserNotificationAction, which has been deprecated in iOS10.
The original question refers to the UNUserNotificationCenterDelegate in iOS 11. Relevant doc: Declaring Your Actionable Notification Types
Quote from the doc: