UIWebView Evaluating JavaScript

I run JavaScript method on UIWebView and expect to get something to res:

NSString *jsCall = [NSString stringWithFormat:@"youtubesearch('%@');",html];
NSString *res = [self.webView stringByEvaluatingJavaScriptFromString:jsCall];

But in res i get an empty string, but when i check the length with :

int len = searchJson.length;

len is 150 – the length i expect to get, but the string is empty, any idea what happend in this case?

Source: ios

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.