swiftui-webkit
Installation
SKILL.md
SwiftUI WebKit Integration
Native WebView struct for SwiftUI. Replaces the old WKWebView + Representable bridge pattern.
Critical Constraints
- ❌ DO NOT use
WKWebView+UIViewRepresentableorNSViewRepresentable→ ✅ UseWebViewstruct directly - ❌ DO NOT use
WKWebViewConfiguration→ ✅ UseWebPage.Configuration - ❌ DO NOT use
WKNavigationDelegate→ ✅ UseWebPage.NavigationDecidingprotocol - ❌ DO NOT use
evaluateJavaScript(_:)→ ✅ Usepage.callJavaScript(_:)(async/await) - ❌ DO NOT use
WKUserContentControllerfor message passing → ✅ UsecallJavaScriptwith arguments
Basic WebView
import SwiftUI
import WebKit