Compose SwiftUIv0.4.0
esc
GuideAPIGitHub
View modifier

onOpenURL(_:)

A view modifier that maps SwiftUI's onOpenURL.

iOS 26.0+macOS 26.0+tvOS 26.0+watchOS 26.0+
fun Modifier.onOpenURL(prefersInApp: Boolean): Modifier

Overview

Modifier.onOpenURL(prefersInApp = true)

This is the Kotlin form of SwiftUI View.onOpenURL(prefersInApp:): SwiftUI documentation. In Swift it reads:

@MainActor @preconcurrency func onOpenURL(prefersInApp: Bool) -> some View

Topics

Overloads

fun Modifier.onOpenURL(prefersInApp: Boolean): Modifier
SwiftUI View.onOpenURL(prefersInApp:)