https://github.com/pcjbird/smartjswebview
支持 H5 页面通过 JavaScript 与 Native App 交互的 WebView。
https://github.com/pcjbird/smartjswebview
app didcreatejavascriptcontext easyjs h5 invoke ios javascript jscontext native smartjs uiwebview webview wkwebview
Last synced: 18 days ago
JSON representation
支持 H5 页面通过 JavaScript 与 Native App 交互的 WebView。
- Host: GitHub
- URL: https://github.com/pcjbird/smartjswebview
- Owner: pcjbird
- License: mit
- Created: 2017-12-16T13:31:11.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-06-18T06:00:02.000Z (almost 3 years ago)
- Last Synced: 2025-03-24T18:44:50.169Z (about 1 month ago)
- Topics: app, didcreatejavascriptcontext, easyjs, h5, invoke, ios, javascript, jscontext, native, smartjs, uiwebview, webview, wkwebview
- Language: Objective-C
- Homepage:
- Size: 216 KB
- Stars: 8
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

[](https://travis-ci.org/pcjbird/SmartJSWebView)
[](http://cocoadocs.org/docsets/SmartJSWebView/)
[](http://cocoadocs.org/docsets/SmartJSWebView/)
[](https://www.apache.org/licenses/LICENSE-2.0.html)
[](https://github.com/pcjbird/SmartJSWebView/releases)
[](https://github.com/pcjbird/SmartJSWebView/releases)
[](https://pcjbird.github.io)# SmartJSWebView
### 支持 H5 页面通过 JavaScript 与 Native App 交互的 WebView,支持白名单功能。从 2.0.0 开始不再支持 UIWebView。## 特性 / Features
1. 支持 H5 页面通过 JavaScript 与 Native App 交互。
2. 安全策略,支持设置白名单功能。
3. 页面重定向后依然可以调用到 Native 方法,不含私有 API,实测通过 AppStore 审核。
4. 在 [EasyJSWebView](https://github.com/dukeland/EasyJSWebView) 基础上编写,功能更强大。
5. 更多可能,JS调用路由框架封装,详见 [QuickWebKit](https://github.com/pcjbird/QuickWebViewController) 的 QuickWebJSBridgePlugin 插件,已实现多个 proxies。
6. 支持 CocoaPods 安装。## 演示 / Demo
## 安装 / Installation
方法一:`SmartJSWebView` is available through CocoaPods. To install it, simply add the following line to your Podfile:
```
pod 'SmartJSWebView'
```## 使用 / Usage
* [Demo项目](https://github.com/pcjbird/SmartJSWebView/tree/master/SmartJSWebViewDemo)
* [测试页面地址](https://pcjbird.github.io/SmartJSWebView/SmartJSWebViewDemo/SmartJSWebViewDemo/floatingconsole/index.html)[](https://twitter.com/intent/tweet?text=https://github.com/pcjbird/SmartJSWebView)
[](https://twitter.com/pcjbird)