In a new post at his Steamclock Software blog, Nigel Brooke writes how Apple has added new Objective-C to Javascript bridging to WebKit:

“This new API supports straightforward embedding of the JavaScriptCore interpreter into native Objective-C projects, including reading and writing variables and object members with appropriate type coercion, calling methods on JavaScript objects, and directly binding Objective-C objects into JavaScript.”

The API performs its bridging using Objective-C protocols, enabling you to bind JavaScript calls to Objective-C implementations. If you’d like to give the tech a test, Brooke has posted a working sample project at github.

Hat tip iOS Dev Weekly

DevJuice: Apple’s ObjC-JavaScript Bridge originally appeared on TUAW – The Unofficial Apple Weblog on Fri, 17 May 2013 12:00:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

You can follow on Twitter or join our Facebook page to keep yourself updated on all the latest from Apple and the Web.