i am working with java script in objective - C.
Following is my code :
NSString *javascript = @"testfunction = function(){ jQuery.getScript(\"https://www.myserver.com/myscript.js\").done(function(script,textStatus){$testvalue = 10; return $testvalue; }).fail(function(jqXHR,settings,exception){\n alert(exception);});}";
[webview stringByEvaluatingJavaScriptFromString:javascript];
NSString *value = [webview stringByEvaluatingJavaScriptFromString:@"testfunction();"];
NSLog(@"Value of Value : %@",value);
now The Problem is:
i want value in my value variable how can i get it?