What problem does it solve?
It solves the problem of embedding and controlling web content inside a SwiftUI app without falling back to generic browser-like wrappers.
Core Features & Use Cases
- SwiftUI-native Web embedding (iOS 26+): Use
WebView for simple URL rendering and WebPage when you need observable page state, navigation control, and tighter integration.
- Navigation policy control: Allow, cancel, or reroute navigations via
WebPage.NavigationDeciding, including opening external domains outside the embedded surface.
- JavaScript integration and app-owned content: Execute JavaScript with
callJavaScript, and serve bundled HTML/CSS/JS via WebPage.Configuration + URLSchemeHandler for offline or custom-scheme docs.
- Use Case: Build an iOS article/help-center experience where HTML/JS drives interactions, and navigation rules ensure links behave correctly (internal stays embedded, external opens externally).
Quick Start
Use the swiftui-webkit skill to embed your in-app article by rendering a SwiftUI WebView(url:) for simple URLs, and switch to WebPage when you need page state, JavaScript calls, or custom navigation policy.