Right here is how I am at the moment dealing with Common Hyperlinks:
@principal
struct MyApp: App {
@UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
@StateObject var dataManager = DataManager()
var physique: some Scene {
WindowGroup {
MainView()
.environmentObject(dataManager)
.onOpenURL { url in
handleIncomingURL(url: url)
}
}
}
personal func handleIncomingURL(url: URL) {
print(url)
let parts = url.pathComponents
let path = parts[1]
if (path == "share") {
// How do I navigate to my ProfileView() right here?
}
}
}
How can I navigate to my ProfileView()
within the code above? Usually I’d simply do one thing like:
NavigationLink(vacation spot: ProfileView()) {
However I can not actually try this right here?