I want to open the "Menu View Controller", when a local notification is opened from the Notification Center. My problem is that I do not know how I can open a view controller from the AppDelegate. All solutions I found did not work, because it were for older Xcode versions before the SceneDelegate was introduced. This is the function in the AppDelegate where I want to call the view controller.
func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {
// missing code to open menu view controller
completionHandler()
}
I use a tab bar controller to navigate between some view controllers. I am not sure if that makes a difference.
Here is how the important part of my storyboard looks.
I hope you can help me. Thank you!