Electrode-iOS / ELHybridWeb

(DEPRECATED) A Swift framework that provides a bridged JavaScript API and web view controller for building hybrid web applications on iOS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ELHybridWeb

Build Status

Note: This framework has been deprecated. It is no longer being actively maintained and will not be updated for future versions of Swift or iOS.

ELHybridWeb is a Swift framework that provides a bridged JavaScript API and web view controller for building hybrid web applications on iOS.

Requirements

ELHybridWeb requires Swift 5 and Xcode 10.2.

Installation

Manual

Install manually by adding ELHybridWeb.xcodeproj to your project and configuring your target to link ELHybridWeb.framework from ELHybridWeb target.

There are two target that builds ELHybridWeb.framework.

  1. ELHybridWeb: Creates dynamically linked ELHybridWeb.framework.
  2. ELHybridWeb_static: Creates statically linked ELHybridWeb.framework.

Carthage

Install with Carthage by adding the framework to your project's Cartfile.

github "Electrode-iOS/ELHybridWeb"

Usage

iOS

Initialize a web view controller and call loadURL() to asynchronously load the web view with a URL.

let webController = WebViewController()
webController.loadURL(NSURL(string: "foo")!)
window?.rootViewController = webController

To utilize the navigation JavaScript API you must provide a navigation controller for the web view controller.

let webController = WebViewController()
webController.addHybridAPI()
webController.loadURL(NSURL(string: "foo")!)

let navigationController = UINavigationController(rootViewController: webController)
window?.rootViewController = navigationController

Web

See the Platform API documentation for a reference of the JavaScript API. An example web application is available at http://bridgeofdeath.herokuapp.com/ that demonstrates basic web usage of ELHybridWeb.

Example

A test iOS project is located in Example/ELHybridWebExample.xcodeproj that is configured to load the test page at http://bridgeofdeath.herokuapp.com/.

About

(DEPRECATED) A Swift framework that provides a bridged JavaScript API and web view controller for building hybrid web applications on iOS

License:MIT License


Languages

Language:Swift 94.4%Language:JavaScript 5.1%Language:Objective-C 0.5%