HTML5 Zone is brought to you in partnership with:

I'm a Worldwide Developer Evangelist for Adobe. My job basically entails me traveling the world and talking about the developer tools and technologies that Adobe has to offer or that we support. I'm also the author of Driving Technical Change. It's about convinving reluctant co-workers to adopt new tools and techniques. Terrence is a DZone MVB and is not an employee of DZone and has posted 40 posts at DZone. You can read more from them at their website. View Full User Profile

PhoneGap Starter Project – Productivity

09.07.2012
| 4496 views |
  • submit to reddit
A few weeks back Ryan Stewart posted on his idea for PhoneGap Starter projects. They were designed to take some of the grief out of getting started with various aspects of PhoneGap and PhoneGap Build projects.  I’ve contributed a project based on one of pet peeves with PhoneGap Build: the lack of productivity.

Don’t get me wrong. I love PhoneGap Build.  I love not having to open multiple IDEs to work on mobile apps. I love working on HTML apps in HTML tools – but you lose a few things in the trade. You lose being able to click one button and have your work available on your device.  You miss being able to click and get a pop up that says your work is ready to view on the device.

These things seem small, but having tried to build actual projects in PhoneGap Build, I found them critical.  I would go kick off a build, and then have to wait for the build to be complete.  I’d open a browser windows while I waited. 20 minutes later, I would cycle through my Chrome windows and remember that I was waiting for a build to complete.  

A few months back I tried my hand and solving this and came up with a shell script that handled this for Android.  Over the past few weeks, I’ve added to, improved, and modified it. I now have a solution in ANT that does the following:

  • Uploads files to PhoneGap Build triggering a rebuild
  • Polls for IOS and Android to be finished
  • Downloads ipa and apk files when ready
  • Installs them onto connected iOS and Android devices
  • Uses the “say” command to let you know when things are done.

It takes the form of an ANT build file, some properties, and 2 shell scripts. I’ve posted the whole thing as PhoneGap Starter Productivity on github. As far as I know this will only work on OS X, which I hope isn’t a huge problem for anyone, and I’m willing to collaborate with someone to make them more cross platform friendly.

Also I feel it’s important to note, that while these scripts mean you don’t have to use the IDE to accomplish these tasks, you still have to have Xcode and the Android SDK on your machine to use them.

Published at DZone with permission of Terrence Ryan, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)