WebViewJavaScriptBridge
Native和H5交互之WebViewJavascriptBridge实现(主要学习这里)
http://www.ethanwhy.com/2016/07/18/native-h5-webviewjavascriptbridge/
优雅的使用 WebViewJavaScriptBridge 注册方法
http://www.jianshu.com/p/a2c8f154566c
WebViewJavascriptBridge详细使用
http://www.huangyibiao.com/archives/670
WebViewJavaScriptBridge的原理解析
http://www.cnblogs.com/WayneLiu/p/5738936.html
WebViewJavascriptBridge详细使用
http://www.cnblogs.com/jiang-xiao-yan/p/5345755.html
Android、IOS JavascriptBridge 兼容方案
http://blog.csdn.net/soslinken/article/details/51955469
file:///Users/kokia/Library/Developer/CoreSimulator/Devices/0DB6353F-01C7-4F88-8D70-7F92254ECFE5/data/Containers/Bundle/Application/109AF200-7065-4822-AC74-70FFF1B7F37D/ExampleApp-iOS.app/ExampleApp.html
wvjbscheme://BRIDGE_LOADED
此时html已经加载完,注入了这段js后,我们在native中点击了callHandler按钮.
wvjbscheme://WVJB_QUEUE_MESSAGE
WebViewJavascriptBridge._fetchQueue();
message[@"callbackId"]
message[@"handlerName"]
[self _queueMessage:message];
[self _dispatchMessage:message];
{"callbackId":"objc_cb_1","data":{"greetingFromObjC":"Hi there, JS!"},"handlerName":"testJavascriptHandler"}
WebViewJavascriptBridge._handleMessageFromObjC('%@');
dic--->json _serializeMessage序列化
json--->dic _deserializeMessageJSON反序列化
oc 调用js 通过stringByEvaluatingJavaScriptFromString;
js调用oc,创建回调;将回调保存下,
JavaScriptCore和Objective-C
http://www.jianshu.com/p/ca5456fb3983
iOS JavaScriptCore使用
http://liuyanwei.jumppo.com/2016/04/03/iOS-JavaScriptCore.html