I want to build a java script bridge for my app.
Through that bridge I want to call js's method, also want to call application's method from js. Can anyone help me with any suggestion?
Thanks
To call the JS function from native code,
[webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"NAME_OF_JS_FUNCTION('ARGUMENT')",configJson]];
To call native function from JS,
window.location = "js-call:"+obj;
It will invoke your webview delegate method.
If you don't mind waiting a couple months, check out the Javascript video at https://developer.apple.com/wwdc/videos/.