Saturday December 10, 2011

GAJavaScript - Objective-C bridge to Javascript running in a web view

Andrew Goodale has a nifty library, GAJavaScript, that gives you an Objective-C interface to invoke Javascript in your web views. It helps box and unbox parameters crossing the bridge and lets you invoke Javascript functions as if they were Objective-C methods.

Even if the library itself is too bulky for your needs you’d do well to browse the code. Good examples of interfacing with web views and Objective-C metaprogramming.