Just targeting one mobile platform is not good enough anymore but building apps for lots of different mobile phone platforms could be a long and tedious task. Every smartphone platform has its own software development kit (SDK), these will need a developer to use different languages to be able to work with them all. You could easily end up with five or six code bases in order to reach a decent number of devices. So what to do if a mobile web site isn't seen as an acceptable alternative? Fortunately mobile apps and mobile web sites are two ends of a spectrum of possibilities. Sitting somewhere in the middle is PhoneGap Build, a service that lets you develop using Javascript, HTML and CSS and then builds apps for five platforms in the cloud.
PhoneGap Build is currently in beta and to gain access you have to register your details and wait patiently, however I found I got my beta invite within a few days. It builds apps developed using the open source mobile framework PhoneGap entirely online so you don't have to worry about installing SDKs or development environments on your computer. There are APIs to interact with phone features like the GPS, sensors, camera and file system and the theory is that you write the code once and it will run on lots of different devices. You can even incorporate JQuery Mobile to make the app look really good.
While PhoneGap Build takes care of building the final apps, a handy tool they link to for the development process is the Ripple Emulator. This is a Google Chrome extension (also works in Chromium) that emulates a mobile phone that is running various web widget platforms, including PhoneGap. You can change the readings of various sensors so you can test your application. For example you could supply it with new GPS coordinates. I hoping that Eclipse Mobile Tools for the Web will be released soon as well. Depending on what your app does though it might be possible to develop much of it in a web browser (without the PhoneGap calls) and use its Javascript console to help you debug the code.
Once the app is finished and packaged in a particular way (instructions on the PhoneGap website), it can be uploaded to the PhoneGap Build service. This builds for five platforms, but you might have to do a little work to get it to build for all five successfully. Four of these platforms are easy to set up, but one is a bit more difficult. Can you think of which one? Yes, that's right iOS! Surprised? To get the build service working for this you will need an Apple Developer account and a Mac to set up a profile, details here: https://build.phonegap.com/docs/ios-builds.
To get the Android app that was built into the Market you will need to sign the app, details here: https://build.phonegap.com/docs/android-signing. However if you just want to test the app you can miss this step put as it can be installed straight onto a phone. The other platforms, Palm webOS, Symbian and Blackberry don't seem to need any special steps. However the build for Blackberry can be temperamental and some of the issues are listed at: https://gist.github.com/778233.
The actual build only seems to take a few minutes and then you are presented with links to the newly built apps (if successful). For some platforms QR codes are provided that you can use with your mobile to get the app straight on there. When you use them though you might have to sign in on your phone to your PhoneGap Build account in order to get the app to actually download.
It is interesting to see mobile phone development start to drift away from a traditional developer environment on a computer and into the cloud, but PhoneGap Build seems to offer a promise of removing a lot of the complexity involved with targeting multiple platforms. It might not be suitable for all applications (you wouldn’t want to use this for many games for example) but for many cases it will be good enough to build a decent application and reach a large number of people quickly. I've only just started experimenting with the platform, but it feels like it is an approach with a lot of potential.
great post!
Hey Liam! Great post. Let me know if you have any further questions or ideas for PhoneGap Build!
Re: PhoneGap Build makes apps in the cloud for multiple platform
Hi!
We looked at phone gap for some work we are doing at the moment. The developers involved had used it in the past and cautioned against it (for the moment) because apps built tend to break more frequently when the device OS is updated.
Similarly we wanted (and might still) use jquery mobile. The problem seems to be that it is very prescriptive in the css that can be used and some of the styles it enforces aren't particularly accessible.
Dont get me wrong, I think both of these are definitely massive steps in the right direction but perhaps not yet quite mature / flexible enough. I'll post more on the decisions we've taken when the work is finished!
Re: PhoneGap Build makes apps in the cloud for multiple platform
oops, and by 'we' I mean the Open University!
great post
great post liam. Just at the right time for me.
Phonegap build
Hi, I was wondering how the build service determines, just from one zip archive, what resources are for Android and what are for iOS?