Our web app can now do many of the things that a native app can do: launch from the home screen, run in full screen mode, store data locally on the iPhone, and operate in offline mode. We’ve formatted it nicely for the device and set up native-looking animations to provide feedback and context to the user.
However, there are still two things that our app cannot do: it can’t access the device features and hardware (e.g., geolocation, accelerometer, sound, and vibration), and it can’t be submitted to the iTunes App Store. In this chapter, you will learn how to use PhoneGap to bridge this, um...gap on your, ah...phone. Clever name, that!
PhoneGap is an open source development tool created by Nitobi (http://www.nitobi.com/) to act as a bridge between web applications and mobile devices. iPhone, Google Android, and BlackBerry operating systems are currently supported, and Nokia and Windows Mobile are in development.
In spite of its high profile, the iPhone is not even close to being the most widely used mobile device. The mobile landscape is littered with devices, platforms, and operating systems. If you are a web developer, you might be familiar with the pain of testing 10 or so browser versions across 10 or so operating system versions. Multiply that by 100, and you have mobile. There is simply no cost-effective way to develop and test across all of the possible combinations.
At the time of this writing, Nitobi was working on an easier way to ...