swiftui-webkit
Installation
SKILL.md
WebKit for SwiftUI (iOS / macOS 26+)
Native SwiftUI web content: no UIViewRepresentable, no WKWebView bridging.
WebView is the on-screen view; WebPage (an @Observable model) loads, observes,
and controls the content. Grounded in Apple's WebKit-for-SwiftUI framework.
- Availability:
WebView/WebPageare iOS 26 / macOS 26 / visionOS 26+. For earlier deployment targets wrapWKWebViewin aUIViewRepresentable— see Fallback andreferences/wkwebview-fallback.md. - State:
WebPageis a plain@Observableclass — observe it exactly like anyswiftui-observationmodel (@State private var page = WebPage()). - Security: the web layer is an attack surface. Restrict navigation with
NavigationDeciding, never inject unsanitized input intocallJavaScript, and evaluateserverTrust/ pin perswift-securityfor money-moving flows.