Skip to content

Commit 68ff037

Browse files
committed
Clarify and improve documentation
1 parent 678ed2c commit 68ff037

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

README.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ WebViewJavascriptBridge
33

44
An iOS/OSX bridge for sending messages between Obj-C and JavaScript in UIWebViews/WebViews.
55

6-
If you like WebViewJavascriptBridge you may also want to check out [WebViewProxy](https://github.com/marcuswestin/WebViewProxy).
7-
86
In the Wild
97
-----------
108
WebViewJavascriptBridge is used by a range of companies and projects. This list is incomplete, but feel free to add your's and send a PR.
@@ -23,30 +21,33 @@ WebViewJavascriptBridge is used by a range of companies and projects. This list
2321
- [Hemlig](http://www.hemlig.co)
2422
- [FRIL](https://fril.jp)
2523

26-
Setup & Examples (iOS & OSX)
27-
----------------------------
24+
Installation (iOS & OSX)
25+
------------------------
2826

2927
### Installation with CocoaPods
28+
Add this to your [podfile](https://guides.cocoapods.org/using/getting-started.html) and run `pod install` to install:
3029

31-
[CocoaPods](http://cocoapods.org) is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like WebViewJavascriptBridge in your projects. See the following [Getting Started](https://guides.cocoapods.org/using/getting-started.html) page for CocoaPods for more information.
32-
33-
#### Podfile
34-
Add the following to your podfile to add this library to your project. Run `pod install` to install them afterwards.
3530
```ruby
3631
`pod 'WebViewJavascriptBridge', '~> 4.1.4'`
3732
```
3833

39-
## Other Usage
34+
### Manual installation
35+
36+
Drag the `WebViewJavascriptBridge` folder into your project.
37+
38+
In the dialog that appears, uncheck "Copy items into destination group's folder" and select "Create groups for any folders".
39+
40+
Examples
41+
--------
4042

41-
Start with the Example Apps/ folder. Open either the iOS or OSX project and hit run to see it in action.
43+
See the `Example Apps/` folder. Open either the iOS or OSX project and hit run to see it in action.
4244

4345
To use a WebViewJavascriptBridge in your own project:
4446

45-
1) Drag the `WebViewJavascriptBridge` folder into your project.
47+
Usage
48+
-----
4649

47-
- In the dialog that appears, uncheck "Copy items into destination group's folder" and select "Create groups for any folders"
48-
49-
2) Import the header file and declare an ivar property:
50+
1) Import the header file and declare an ivar property:
5051

5152
```objc
5253
#import "WebViewJavascriptBridge.h"
@@ -58,7 +59,7 @@ To use a WebViewJavascriptBridge in your own project:
5859
@property WebViewJavascriptBridge* bridge;
5960
```
6061

61-
3) Instantiate WebViewJavascriptBridge with a UIWebView (iOS) or WebView (OSX):
62+
2) Instantiate WebViewJavascriptBridge with a UIWebView (iOS) or WebView (OSX):
6263

6364
```objc
6465
self.bridge = [WebViewJavascriptBridge bridgeForWebView:webView handler:^(id data, WVJBResponseCallback responseCallback) {
@@ -67,7 +68,7 @@ self.bridge = [WebViewJavascriptBridge bridgeForWebView:webView handler:^(id dat
6768
}];
6869
```
6970
70-
4) Go ahead and send some messages from ObjC to javascript:
71+
3) Go ahead and send some messages from ObjC to javascript:
7172
7273
```objc
7374
[self.bridge send:@"Well hello there"];

0 commit comments

Comments
 (0)