All Projects → tmarkovski → BridgeCommander

tmarkovski / BridgeCommander

Licence: MIT license
No description or website provided.

Programming Languages

swift
15916 projects
javascript
184084 projects - #8 most used programming language
objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to BridgeCommander

Ionic Native Http Connection Backend
A solution to CORS issues with Ionic and iOS
Stars: ✭ 142 (+491.67%)
Mutual labels:  wkwebview
Rxwebkit
RxWebKit is a RxSwift wrapper for WebKit
Stars: ✭ 176 (+633.33%)
Mutual labels:  wkwebview
HDEmptyView
一个Swift语言封装的EmptyView显示库,可作用于WKWebView、UITableView、UICollectionView 无网络提醒或者空数据提醒
Stars: ✭ 29 (+20.83%)
Mutual labels:  wkwebview
Flwebview
WKWebView with UIWebView fallback for iOS.
Stars: ✭ 145 (+504.17%)
Mutual labels:  wkwebview
Wkcookiewebview
WKWebView with cookie sharing support
Stars: ✭ 171 (+612.5%)
Mutual labels:  wkwebview
HTMLWithImagesToPDF
Generate a PDF from an HTML file containing images (iOS).
Stars: ✭ 38 (+58.33%)
Mutual labels:  wkwebview
Flutter browser app
A Full-Featured Mobile Browser App (such as the Google Chrome mobile browser) created using Flutter and the features offered by the flutter_inappwebview plugin.
Stars: ✭ 85 (+254.17%)
Mutual labels:  wkwebview
cordova-plugin-wkkeyboardfix
Cordova plugin to provide a temporary fix for an iOS 12 and 13 bug involving keyboards in WKWebView.
Stars: ✭ 14 (-41.67%)
Mutual labels:  wkwebview
Wkwebviewwithurlprotocol
WKWebView With URLProtocol
Stars: ✭ 174 (+625%)
Mutual labels:  wkwebview
AppHostExample
a web-based project embeded AppHost
Stars: ✭ 16 (-33.33%)
Mutual labels:  wkwebview
Applemusicultra
Music Client for macOS. Upgrade your music experience with themes, styles, custom scripting and more. Uses WebKit and JavaScript.
Stars: ✭ 155 (+545.83%)
Mutual labels:  wkwebview
Pawebview
An component WebView for iOS base on WKWebView
Stars: ✭ 169 (+604.17%)
Mutual labels:  wkwebview
WKBridge
Bridge for WKWebView and JavaScript
Stars: ✭ 70 (+191.67%)
Mutual labels:  wkwebview
Lcwebview
www.strictfrog.com
Stars: ✭ 144 (+500%)
Mutual labels:  wkwebview
SwiftyMercuryReady
Add a "reader" functionality to a WKWebView
Stars: ✭ 74 (+208.33%)
Mutual labels:  wkwebview
Mybrowser
我的浏览器,基于WKWebView实现的一个iOS浏览器,实现了无图模式、广告拦截、多窗口、扫描二维码、收藏夹/历史、无痕浏览、夜间模式等功能...
Stars: ✭ 127 (+429.17%)
Mutual labels:  wkwebview
Wkwebviewextension
An extension for WKWebView. Providing menuItems delete 、support protocol 、clear cache of iOS8 and so on.
Stars: ✭ 182 (+658.33%)
Mutual labels:  wkwebview
VHLWebView
微信/支付宝样式的网络浏览器控件。WKwebview 封装,js bridge和拦截url方式两种方法实现 oc和js交互
Stars: ✭ 14 (-41.67%)
Mutual labels:  wkwebview
QuickWebKit
A great & strong plugin based WebViewController. 一款基于插件的 WebView 视图控制器,您可以基于它设计您的浏览器插件,然后像积木一样来组装它们。
Stars: ✭ 29 (+20.83%)
Mutual labels:  wkwebview
WKWebView-Console
How to output console.log in Xcode (using wkwebview)?
Stars: ✭ 40 (+66.67%)
Mutual labels:  wkwebview

BridgeCommander

Build Status

A wrapper library for iOS apps that provides easy to use functions for briding the communication between the native runtime and javascript runtime hosted in a WKWebView. The library wraps the functionality provided by WKUserContentController and embeds a javascript library that exposes promise style functions.

Usage

In Swift, create a BridgeCommander instance and start adding commands. Use send function to provide result back or error to pass back an error result.

    let commander = BridgeCommander(webView)
    commander.add("echo") { command in
        command.send(args: "You said: \(command.args)")
    }

In JavaScript, invoke this command as

    BridgeCommander.call("echo", "Hello!")
        .then(function(result) { console.log(result); })
        .catch(function(error) { console.log(error); });

That's it!

Installation

Plain old copy/paste

The simplest way would be to add BridgeCommander.swift and BridgeCommander.js to your xcode project. Make sure to update the javascript file reference inside the code if you rename the files or place them in separate folders. Do not reference the js file in your web app, it will be automatically available everywhere.

Using Carthage

This is a clean and fast way to use this as a library in your project. If you're unfamiliar with Carthage, read Ray's article on using it

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].