I am trying to switch my root ViewController to my HomeViewController when a notification is tapped containing the "Home" category. Since the addition of SceneDelegate, I've hit a wall with transitioning the ViewController from AppDelegate.
My AppDelegate, using storyboard Swift 5 and Xcode 11.6
func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {
print("Handle push from background or closed")
print("user clicked on the notification")
let userInfo = response.notification.request.content.userInfo
let categoryValue = userInfo["category"] as? String ?? "0"
if categoryValue == "Home"
{
print("Switching to Home!")
//change ViewController here
}
}
}
Thank you for your help!