azuredark / iOS-WKWebViewBridgeExample-ObjC

A sample app in ObjC that demonstrates how to bridge between JS-Native code using WKWebViews in iOS8

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

iOS-WKWebViewBridgeExample-ObjC

A sample app in ObjC that demonstrates how to bridge between JS-Native code using WKWebViews in iOS8.

In this example, we load a simple HTML page that has a button using a WKWebView. When the page loads, the native app injects a JS ("User Script") into the loaded document that listens for button click event and calls back into the native app ("Script Message") . The native app implements a listener to handle the callback message from the web page and updates the color of the button from within the callback handler.

Related presentation available for download at http://www.priyaontech.com/download/25/

About

A sample app in ObjC that demonstrates how to bridge between JS-Native code using WKWebViews in iOS8

License:MIT License


Languages

Language:Objective-C 93.1%Language:HTML 5.4%Language:JavaScript 1.5%