Write an app intent in swiftui which launches the app via a deep link
- User
Write an app intent in swiftui which launches the app via a deep link
Assistant
Here is an example of how to handle deep links and launch an app via a deep link in SwiftUI:
import SwiftUI @main struct MyApp: App { @State private var deepLink: String? var body: some Scene { WindowGroup { ContentView() .onOpenURL { url in deepLink = url.absoluteString } } .onChange(of: deepLink) { newDeepLink in // Take action based on the deep link } } } struct ContentView: View { @State private var deepLink: String? var body: some View { if let deepLink = deepLink { // Show deep link specific view } else { // Show regular content } } }The key things:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.