What problem does it solve?
Embedding and controlling web content inside SwiftUI applications often requires bridging WebView with app state, navigation, and JavaScript interaction. This Skill provides a unified approach using WebView and WebPage to load, navigate, and customize embedded web experiences.
Core Features & Use Cases
- Embed and control web content in SwiftUI apps using the native WebView struct and WebPage observable class.
- Load URLs, HTML strings, and data with navigation, JavaScript interop, and view customization.
- Support advanced interactions: navigation control (back/forward/reload), JavaScript execution with safe argument passing, content isolation via WKContentWorld, snapshot capture, and PDF export.
- Typical use case: build an in-app browser or web-based UI panel that seamlessly integrates with SwiftUI state and responds to navigation events.
Quick Start
Instantiate a WebPage and attach it to a WebView, then load a URL to begin embedding web content in your SwiftUI view.