<commit_before># Zoot

Zoot (`THGHybridWeb` module) is a Swift framework that provides a bridged JavaScript API and web view controller for building hybrid web applications on iOS. Zoot uses [BridgeOfDeath](https://github.com/TheHolyGrail/BridgeOfDeath) to bridge Swift objects to JavaScript.

## Installation

### Carthage

Install with [Carthage](https://github.com/Carthage/Carthage) by adding the framework to your project's [Cartfile](https://github.com/Carthage/Carthage/blob/master/Documentation/Artifacts.md#cartfile).

```
github "TheHolyGrail/Zoot" ~> 0.0.2
```

### Manual

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

Zoot depends on the following [THG](https://github.com/TheHolyGrail/) modules:

- [`THGBridge`/BridgeOfDeath](https://github.com/TheHolyGrail/BridgeOfDeath).
  - [`THGFoundation`/Excalibur](https://github.com/TheHolyGrail/Excalibur).
  - [`THGLog`/Shrubbery](https://github.com/TheHolyGrail/Shrubbery).

[THG](https://github.com/TheHolyGrail/) modules are designed to live side-by-side in the file system, like so:

* \MyProject
* \MyProject\Zoot
* \MyProject\BridgeOfDeath
* \MyProject\Excalibur
* \MyProject\Shrubbery

## Usage

[See the Platform API documentation](platformAPI.md)

## Example

A test iOS project is located in Example/ZootExample.xcodeproj that is configured to load the test page at [http://bridgeofdeath.herokuapp.com/](http://bridgeofdeath.herokuapp.com/).

## Contributions

We appreciate your contributions to all of our projects and look forward to interacting with you via Pull Requests, the issue tracker, via Twitter, etc.  We're happy to help you, and to have you help us.  We'll strive to answer every PR and issue and be very transparent in what we do.

When contributing code, please refer to our style guide [Dennis](https://github.com/TheHolyGrail/Dennis).

###### THG's Primary Contributors

Dr. Sneed ([@bsneed](https://github.com/bsneed))<br>
<NAME> ([@steveriggins](https://github.com/steveriggins))<br>
<NAME> ([@samgrover](https://github.com/samgrover))<br>
<NAME> ([@angelodipaolo](https://github.com/angelodipaolo))<br><commit_msg>add basic usage info to readme<commit_after># Zoot

Zoot (`THGHybridWeb` module) is a Swift framework that provides a bridged JavaScript API and web view controller for building hybrid web applications on iOS. Zoot uses [BridgeOfDeath](https://github.com/TheHolyGrail/BridgeOfDeath) to bridge Swift objects to JavaScript.

## Installation

### Carthage

Install with [Carthage](https://github.com/Carthage/Carthage) by adding the framework to your project's [Cartfile](https://github.com/Carthage/Carthage/blob/master/Documentation/Artifacts.md#cartfile).

```
github "TheHolyGrail/Zoot" ~> 0.0.2
```

### Manual

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

Zoot depends on the following [THG](https://github.com/TheHolyGrail/) modules:

- [`THGBridge`/BridgeOfDeath](https://github.com/TheHolyGrail/BridgeOfDeath).
  - [`THGFoundation`/Excalibur](https://github.com/TheHolyGrail/Excalibur).
  - [`THGLog`/Shrubbery](https://github.com/TheHolyGrail/Shrubbery).

[THG](https://github.com/TheHolyGrail/) modules are designed to live side-by-side in the file system, like so:

* \MyProject
* \MyProject\Zoot
* \MyProject\BridgeOfDeath
* \MyProject\Excalibur
* \MyProject\Shrubbery

## Usage

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
```

Call `addHybridAPI()` to add the bridged JavaScript API to the web view. The JavaScript API will be accessible to any web pages that are loaded in the web view controller.

```
let webController = WebViewController()
webController.addHybridAPI()
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
```

[See the Platform API documentation](platformAPI.md)

## Example

A test iOS project is located in Example/ZootExample.xcodeproj that is configured to load the test page at [http://bridgeofdeath.herokuapp.com/](http://bridgeofdeath.herokuapp.com/).

## Contributions

We appreciate your contributions to all of our projects and look forward to interacting with you via Pull Requests, the issue tracker, via Twitter, etc.  We're happy to help you, and to have you help us.  We'll strive to answer every PR and issue and be very transparent in what we do.

When contributing code, please refer to our style guide [Dennis](https://github.com/TheHolyGrail/Dennis).

###### THG's Primary Contributors

Dr. Sneed ([@bsneed](https://github.com/bsneed))<br>
<NAME> ([@steveriggins](https://github.com/steveriggins))<br>
<NAME> ([@samgrover](https://github.com/samgrover))<br>
<NAME> ([@angelodipaolo](https://github.com/angelodipaolo))<br>
{'fraction_non_alphanumeric': 0.1196629213483146, 'fraction_numerical': 0.0011235955056179776, 'mean_word_length': 5.404076738609112, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 19, 'https://': 26, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4343886', 'n_tokens_mistral': 1713, 'n_tokens_neox': 1603, 'n_words': 485}