swiftui-webkit

Embed and control web content in SwiftUI apps using WebView and WebPage APIs.

Updated Apr 30, 2026
One-click install
npx skills add https://github.com/onymchat/onym-ios --skill swiftui-webkit-onymchat
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swiftui-webkit
Source: https://github.com/onymchat/onym-ios/tree/main/.claude/skills/swiftui-webkit
Command: npx skills add https://github.com/onymchat/onym-ios --skill swiftui-webkit-onymchat

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enables embedding and managing web content inside SwiftUI apps by exposing native WebKit-based controls through WebView and WebPage, allowing app-owned HTML, JavaScript interaction, and navigation policy customization within iOS 26+ SwiftUI surfaces.

Core Features & Use Cases

  • Embedding app-owned web content with WebView and WebPage to drive navigation and state.
  • JavaScript integration via callJavaScript for dynamic page interaction.
  • Local content and custom URL schemes via WebPage.Configuration and URLSchemeHandler for offline or bundled assets.
  • Observing page state (title, url, isLoading, progress) and handling navigation events to coordinate in-app flows.
  • Migration-friendly guidance for moving from WKWebView wrappers to WebView/WebPage in SwiftUI apps.

Quick Start

Create a WebView (or WebPage) and load your URL to display embedded web content in a SwiftUI screen.

Frequently Asked Questions about swiftui-webkit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I embed web content in a SwiftUI app?

To embed web content in SwiftUI, use the native WebView and WebPage APIs to load URLs and render HTML directly within your app's interface. These controls display app-owned web content while coordinating navigation and observing page state.

Can I call JavaScript from a SwiftUI WebView?

Yes, you can call JavaScript from a SwiftUI WebView using the callJavaScript method. This enables dynamic interaction with embedded web pages, allowing your native app to execute JS code and manipulate page content directly.

How do I load local bundled assets in a SwiftUI WebView?

To load local bundled assets in a SwiftUI WebView, configure WebPage.Configuration with a custom URLSchemeHandler. This setup allows your app to serve offline or bundled content securely through custom URL schemes.

Does this WebKit integration work with iOS 26 SwiftUI surfaces?

Yes, this WebKit integration is specifically designed for iOS 26+ SwiftUI surfaces. It provides production-grade web experiences by exposing native WebView and WebPage APIs tailored for the latest SwiftUI environment.

What is the best way to migrate from WKWebView to SwiftUI WebView?

The best way to migrate from WKWebView wrappers to SwiftUI WebView is to follow the provided migration-friendly guidance. This transition leverages the native WebPage API to observe page state and handle navigation events within SwiftUI.

How do I control navigation policies in a SwiftUI WebView?

You control navigation policies in a SwiftUI WebView by observing page state and handling navigation events to coordinate in-app flows. This allows you to enforce rules on how the app-owned content navigates between URLs.