C H A P T E R  15

Going Native with PhoneGap

You can do a lot with Mobile Safari, but there's always room for improvement. In particular you might want native controls or even want to take video or photos using your camera, but you can't do that with Mobile Safari. Enter PhoneGap.

PhoneGap was created at an iPhoneDevCamp in San Francisco in 2005.

I started using PhoneGap a few years ago and was amazed at how by just using JavaScript I could access all the basic functions I needed without knowing Objective-C. Basically PhoneGap renders your app using what's called a UIWebView. This allows a native app to basically render local HTML, CSS, and JavaScript files in a window using Mobile Safari while allowing access to all the native functions you ...

Get Learn HTML5 and JavaScript for iOS now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.