I have push notification on my app (works well) and I would like to redirect my users to my "Messages" view when they click on the notification, how to do that in SwiftUI (no Storyboard)?
I know that i have to implement the code in this function (in AppDelegate) :
func userNotificationCenter(_ center: UNUserNotificationCenter,
didReceive response: UNNotificationResponse,
withCompletionHandler completionHandler: @escaping () -> Void) {
}
My main view is a Tabview and "Messages" view is in it in a navigation View.
Thanks for your help!