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
@@ -31,7 +32,7 @@ To use a WebViewJavascriptBridge in your own project:
31
32
1) Drag the `WebViewJavascriptBridge` folder into your project.
32
33
33
34
- In the dialog that appears, uncheck "Copy items into destination group's folder" and select "Create groups for any folders"
34
-
35
+
35
36
2) Import the header file:
36
37
37
38
#import "WebViewJavascriptBridge.h"
@@ -52,7 +53,7 @@ To use a WebViewJavascriptBridge in your own project:
52
53
}];
53
54
54
55
4) Finally, set up the javascript side:
55
-
56
+
56
57
function connectWebViewJavascriptBridge(callback) {
57
58
if (window.WebViewJavascriptBridge) {
58
59
callback(WebViewJavascriptBridge)
@@ -62,13 +63,13 @@ To use a WebViewJavascriptBridge in your own project:
62
63
}, false)
63
64
}
64
65
}
65
-
66
+
66
67
connectWebViewJavascriptBridge(function(bridge) {
67
-
68
+
68
69
/* Init your app here */
69
70
70
71
bridge.init(function(message, responseCallback) {
71
-
alert('Received message: ' + message)
72
+
alert('Received message: ' + message)
72
73
if (responseCallback) {
73
74
responseCallback("Right back atcha")
74
75
}
@@ -100,14 +101,14 @@ The `WVJBResponseCallback` will not be `nil` if the javascript expects a respons
100
101
Optionally, pass in `webViewDelegate:(UIWebViewDelegate*)webViewDelegate` if you need to respond to the [web view's lifecycle events](http://developer.apple.com/library/ios/documentation/uikit/reference/UIWebViewDelegate_Protocol/Reference/Reference.html).
0 commit comments