I'm working on a ios Application, now I want to get the action of push notification's allow button, the user will be push to second view controller once user select one of push notification option(don't allow, allow).
You need to call these methods in AppDelegate Class.
//Ios 10 delegates for Push Notifications
func userNotificationCenter( _ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping ( _ options: UNNotificationPresentationOptions) -> Void){
print("Handle push from foreground")
}
func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void){
print("Handle push from background or closed")
}