File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ Pod ::Spec . new do |s |
2+ s . name = "WebViewJavascriptBridge"
3+ s . version = "2.1.1"
4+ s . summary = "A standalone iOS class for sending messages to and from javascript in a UIWebView."
5+ s . homepage = "http://github.com/marcuswestin/WebViewJavascriptBridge"
6+ s . license = { :type => "MIT" , :file => "LICENSE" }
7+ s . author = { "marcuswestin" => "[email protected] " } 8+ s . source = { :git => "https://github.com/marcuswestin/WebViewJavascriptBridge.git" , :tag => "2.1.1" }
9+ s . platform = :ios , "4.2"
10+ s . source_files = "WebViewJavascriptBridge/WebViewJavascriptBridge.{h,m}"
11+ s . resource = "WebViewJavascriptBridge/WebViewJavascriptBridge.js.txt"
12+ s . framework = "UIKit"
13+ s . dependency "JSONKit"
14+ end
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ - (void)callHandler:(NSString *)handlerName data:(id)data responseCallback:(WVJB
6969}
7070
7171- (void )registerHandler : (NSString *)handlerName handler : (WVJBHandler)handler {
72- [self .messageHandlers setObject: handler forKey: handlerName];
72+ [self .messageHandlers setObject: [ handler copy ] forKey: handlerName];
7373}
7474
7575- (void )reset {
@@ -83,7 +83,7 @@ - (void)_sendData:(NSDictionary *)data responseCallback:(WVJBResponseCallback)re
8383
8484 if (responseCallback) {
8585 NSString * callbackId = [NSString stringWithFormat: @" objc_cb_%d " , ++_uniqueId];
86- [self .responseCallbacks setObject: responseCallback forKey: callbackId];
86+ [self .responseCallbacks setObject: [ responseCallback copy ] forKey: callbackId];
8787 [message setObject: callbackId forKey: @" callbackId" ];
8888 }
8989
You can’t perform that action at this time.
0 commit comments