Here is the code I've written for my iOS application:
webView = [[UIWebView alloc] init];
webView.delegate = self;
[webView loadHTMLString:@"<script type=\"text/javascript\" src=\"myFile.js\"></script>" baseURL:[NSURL fileURLWithPath:[NSBundle mainBundle].resourcePath]];
NSString* result =(NSString*)[webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"myFunction(%d,%d,%d)", num1,num2,num3]];
NSLog(@"RESULT1 : %@", result);
And this is my JavaScript file, myFile.js:
function myFunction(a,b,c)
{
return a*b*c;
}
However, I'm not getting any output in the result string. Can someone help me figure out what's wrong?