Building native apps with PhoneGap
Even though we can bring offline access, startup images, client-side data storage, and other nifty features to web apps, web apps still can't use device hardware features. Accelerometer, sound, vibration, and iPhone's inbuilt geolocation features are hardware-oriented and they're available only with native apps. Native iPhone apps were usually built with Objective C on Mac machines till PhoneGap. PhoneGap is an alternative development tool that allows us to build native iPhone apps in HTML, CSS, and JavaScript. It acts as a bridge between web applications and mobile devices; hence, it allows us to convert our web apps to other mobile targets quickly. Apart from the iPhone, it also supports other smartphones like Android and BlackBerry. It is a very cost-effective solution as it allows us to reuse the same codebase for many purposes—website building, web app building, and native app building. Another positive side is that it is open source. In this recipe...