All Projects → pengwei1024 → JsBridge-WebViewJavascriptBridge-Sample

pengwei1024 / JsBridge-WebViewJavascriptBridge-Sample

Licence: Apache-2.0 license
iOS JsBridge Solution by WebViewJavascriptBridge

Programming Languages

objective c
16641 projects - #2 most used programming language
HTML
75241 projects
javascript
184084 projects - #8 most used programming language
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to JsBridge-WebViewJavascriptBridge-Sample

Dsbridge Ios
🌏 A modern cross-platform JavaScript bridge, through which you can invoke each other's functions synchronously or asynchronously between JavaScript and native.
Stars: ✭ 1,673 (+10356.25%)
Mutual labels:  webviewjavascriptbridge, jsbridge
QuickWebKit
A great & strong plugin based WebViewController. 一款基于插件的 WebView 视图控制器,您可以基于它设计您的浏览器插件,然后像积木一样来组装它们。
Stars: ✭ 29 (+81.25%)
Mutual labels:  uiwebview, jsbridge
FMWebViewJavascriptBridge
FMWebViewJavascriptBridge inspired by WebViewJavascripBridge and react native
Stars: ✭ 29 (+81.25%)
Mutual labels:  webviewjavascriptbridge, jsbridge
Dsbridge Android
🌎 A modern cross-platform JavaScript bridge, through which you can invoke each other's functions synchronously or asynchronously between JavaScript and native.
Stars: ✭ 3,239 (+20143.75%)
Mutual labels:  webviewjavascriptbridge, jsbridge
ZJsBridge
一套完整的native-bridge-web协议与实现,清晰规范的开发Hybrid App
Stars: ✭ 21 (+31.25%)
Mutual labels:  jsbridge
animaris
Documentation and Mock for JSBridge base on ThinkJS & MongoDB & React & Antd.
Stars: ✭ 28 (+75%)
Mutual labels:  jsbridge
autojs-webView
autojs的webView实现,支持初始化脚本注入、jsBridge两端互调
Stars: ✭ 38 (+137.5%)
Mutual labels:  jsbridge
WebViewJavaScriptBridge
android webview javascript bridge
Stars: ✭ 24 (+50%)
Mutual labels:  webviewjavascriptbridge
SwiftJSBridge
SwiftJSBridge is a handy JavaScript Bridge, written in Swift, support WKWebView and UIWebView
Stars: ✭ 29 (+81.25%)
Mutual labels:  jsbridge
Android-Web-Inspector
How to Inspecting Android WebView, Network logs, XHR logs (including url request and parameter) and Element/DOM inspecting
Stars: ✭ 54 (+237.5%)
Mutual labels:  webviewjavascriptbridge
X5Bridge
Three party libraries of Tencent x5webview and JS interaction
Stars: ✭ 17 (+6.25%)
Mutual labels:  webviewjavascriptbridge
JSBridge
JSBridge与Native通信,对Web端调用进行封装
Stars: ✭ 19 (+18.75%)
Mutual labels:  jsbridge
JJGWebView
UIWebView class and example implementation for iOS Applications
Stars: ✭ 33 (+106.25%)
Mutual labels:  uiwebview
WebViewJavascriptBridge
This is a communication between Android applications and Web Javascript to establish a bridge between the call support each other
Stars: ✭ 16 (+0%)
Mutual labels:  webviewjavascriptbridge
XLRefresh
iOS 下拉刷新工具
Stars: ✭ 25 (+56.25%)
Mutual labels:  uiwebview
AppHostExample
a web-based project embeded AppHost
Stars: ✭ 16 (+0%)
Mutual labels:  jsbridge
Towebviewcontroller
A view controller class for iOS that allows users to view web pages directly within an app.
Stars: ✭ 1,500 (+9275%)
Mutual labels:  uiwebview
Vue-JsBridge
JsBridge for Vue
Stars: ✭ 15 (-6.25%)
Mutual labels:  jsbridge
Njkwebviewprogress
UIWebView progress interface
Stars: ✭ 3,947 (+24568.75%)
Mutual labels:  uiwebview
HTMLWithImagesToPDF
Generate a PDF from an HTML file containing images (iOS).
Stars: ✭ 38 (+137.5%)
Mutual labels:  uiwebview

JsBridge-WebViewJavascriptBridge

iOS JsBridge Solution by WebViewJavascriptBridge

JsBridge 开发的 iOS 解决方案

Sample

Native register

[self.bridge registerHandler:@"MyBridge.native.alertDialog" handler:^(id data, WVJBResponseCallback responseCallback) {

        if (data && [data isKindOfClass:[NSDictionary class]]) {
            NSLog(@"title = %@, desc=%@", [data objectForKey:@"title"], [data objectForKey:@"desc"]);
            UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:[data objectForKey:@"title"]
                                                                message:[data objectForKey:@"desc"]
                                                               delegate:self cancelButtonTitle:@"cancel" otherButtonTitles:@"sure", nil];
            [alertView show];
            callback = responseCallback;
        }
    }];

Js Call

MyBridge.native.alertDialog(
     'Title',
      'it\'s a native dialog',
      function(){
            alert('sure button click');
       },
      function(){
         alert('cancel button click');
       }
       );

License

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].