You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-11Lines changed: 10 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,13 +11,13 @@ Just open the Xcode project (requires Xcode > 4.2) and hit run to see the exampl
11
11
Usage
12
12
-----
13
13
14
-
See WebViewJavascriptBridge/AppDelegate.*and WebViewJavascriptBridge/ExampleWebViewJavascriptBridgeDelegate.*for example code that works. Or, follow these steps:
14
+
See ExampleAppDelegate.* for example code. To use it in your own project:
15
15
16
16
1) Copy `Classes/WebViewJavascriptBridge.h` and `Classes/WebViewJavascriptBridge.m` into your Xcode project
17
17
18
18
2) Instantiate a UIWebView, a WebViewJavascriptBridge, and set yourself as the bridge's delegate
WebViewJavascriptBridge.sendMessage('Hello from the JS scope!');
61
-
}
57
+
alert('Received message: ' + message)
58
+
})
59
+
WebViewJavascriptBridge.sendMessage('Hello from the javascript')
60
+
}, false)
62
61
63
-
Notes
64
-
-----
65
-
If you're using the new ARC features, please remind yourself to add `-fno-objc-arc` as a compiler flag to the `WebViewJavascriptBridge.m` file. This will disable ARC for this specific class.
62
+
ARC
63
+
---
64
+
If you're using ARC in your project, add `-fno-objc-arc` as a compiler flag to the `WebViewJavascriptBridge.m` file.
0 commit comments