I’ve been looking for a way to call Objective-C code from some JavaScript in my UIWebView. A lot of topics has been created about this, and some of them are recommending the procedure done in the blog post UIWebView Secrets – Part3 – How to Properly Call ObjectiveC From Javascript, where UIWebViewDelegate methods are hacked to call native Objective-C code from. Is this still the best way to do this? It seems that PhoneGap has a way to do this, but I cannot find out how to. But if their procedure is equal to this, I cannot see why I should include their library just to do this.
Which procedure is currently best practice to do this?
I end up using the NativeBridge plugin recommended in the blog post.