webviewbridge-guide

Community

Kickstart Swift WebViewBridge integration.

AuthorSunalamye
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill guide helps developers integrate the Swift WebViewBridge library to build a macOS WebPage bridge with JavaScript injection and bidirectional communication, reducing boilerplate and setup time.

Core Features & Use Cases

  • Guided setup: Step-by-step integration of WebViewBridge, including bridge creation, module registration, and configuration of WebPage.
  • JS ↔ Swift Messaging: How to send messages from JavaScript to Swift and back.
  • Call JavaScript from Swift: How to execute JavaScript in the WebPage context with return values.
  • WebPage Configuration: Demonstrates configuring WKWebView's content controller and WebPage.
  • WebSocket Interception: Instructions to install WebSocket interceptors for debugging or controls.

Quick Start

  • Install and import WebViewBridge in your macOS app.
  • Create a bridge instance with a handlerName.
  • Register core modules and your custom module.
  • Configure a WKWebView through WebPage and contentController.
  • Call JavaScript using bridge.callJavaScript() and handle results.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: webviewbridge-guide
Download link: https://github.com/Sunalamye/WebViewBridge/archive/main.zip#webviewbridge-guide

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository