Skip to content

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

License

Notifications You must be signed in to change notification settings

Pikuseru/iOS-WKWebViewBridgeExample-ObjC

 
 

Repository files navigation

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.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Objective-C 93.1%
  • HTML 5.4%
  • JavaScript 1.5%