Update README.md
WKWebView를 상속해서 JSBridge를 사용할 수 있도록 구현되어 있습니다.
Use Xcode to add to the project (File -> Swift Packages) or add this to your Package.swift file:
Package.swift
.package(url: "https://github.com/rws08/WKWebViewJSBridge", from: "1.0.0")
Create an WKWebViewJSBridge
import WKWebViewJSBridge let webviewJSB = WKWebViewJSBridge()
Request & Receive to JS from Swift (Swift -> JS)
webviewJSB.requestWeb(name: "RoundRequest", param: ["title":"Round Requests from Swift"]) { _, json in }
Receive to Swift from JS (JS -> Swift)
webviewJSB.addReceiverHandler(name: "OnlyRequest") { _, json in } .addReceiverHandler(name: "RoundRequest") { _, json in }
For details of JS, refer to the JSBridge.js file.
JSBridge.js
Released under the MIT license.
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
WKWebViewJSBridge
Description
WKWebView를 상속해서 JSBridge를 사용할 수 있도록 구현되어 있습니다.
Installation
Swift Package Manager
Use Xcode to add to the project (File -> Swift Packages) or add this to your
Package.swift
file:Usage
Getting Started
Create an WKWebViewJSBridge
Request & Receive to JS from Swift (Swift -> JS)
Receive to Swift from JS (JS -> Swift)
For details of JS, refer to the
JSBridge.js
file.License
Released under the MIT license.