Reputation: 137
can any one help me in catching the JS log message on xcode console, JS has to be run on web view (UIWebView).
Upvotes: 3
Views: 817
Reputation: 5977
to receive message from one webview use custom url scheme just like "log:yourlogmsg"
js code
window.location = "log:yourlogmsg";
use
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
and return false;
Upvotes: 2