Get Updates By E-mail 

Article Written By:
Johann Dowa

Open Source Library That Makes Objective-C And UIWebView Interaction More Convenient

  •  
  •  
  •  
  •  
  •  

Frameworks like Phonegap (Cordova) allow you to develop your entire app using HTML/Javascript.  However, there are definite overkill if you’re looking to develop your apps in Objective-C, but want to use a UIWebView for a few specific instances.

I’ve previously mentioned the UIWebview Javascript bridge that allows you to communicate with a webview through your Objective-C code which is great for this purpose..

Today I came across another library that takes things a step further providing a number of extremely useful features (including some I have never seen in a similar library).

These features include:

  • selector methods for interacting with commonly used Javascript functions and DOM interfaces.
  • error handling (Javascript errors are returned as NSError objects)
  • the ability to communicate directly with Objective-C objects from Javascript
  • callbacks from Objective-C to Javascript

The library is GAJAvascript from Andrew Goodale.

You can find GAJavascript with examples and documentation on Github here.

A great method for those times when it’s easier to use a UIWebView.


  •  
  •  
  •  
  •  
  •  

Submit A Resource

Have you created a useful tutorial, library or tool for iOS development that you would like to get in front of our 300,000+ monthly page views from iOS developers?

You can submit the url here.

The resources we feel will appeal to our readers the most will be posted on the front page.

Comments