One method of communication between iOS and JavaScript involves creating fake URLs in JavaScript and appending a string as a parameter to Objective-C code. This URL is then parsed in the delegate method:
-(BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
The return value from this process is sent by invoking the native method
stringByEvaluatingJavaScriptFromString
with the parameter callID.
However, I am interested in finding a way to directly call Objective-C methods from JavaScript on iOS, similar to how it can be done on Android without requiring additional JavaScript code to retrieve the return value. Our existing JavaScript code functions seamlessly with Android, but we are seeking a solution that will also meet AppStore requirements for iOS.