Can someone please help me, Im new to swiftUI and I want to implement universal link for my app. I have prepared my AASA and also added associated domain to the app. But I am confused when it comes to the code in Scene delegate for opening the app when the link is clicked.
This would be the solution with uikit. But how would I do this with swiftUI?
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool { return false }
This is what im trying
func scene(_ scene: UIScene, continue userActivity: NSUserActivity)
{
guard userActivity.activityType == NSUserActivityTypeBrowsingWeb,
let url = userActivity.webpageURL,
let components = URLComponents(url: url, resolvingAgainstBaseURL: true) else
{
return
}
if let userActivity = scene.userActivity
{
self.scene(scene, continue: userActivity)
}
}