I've been using PhoneGap for a recent mobile application that we're developing for a client. During development I found a super helpful library in nomad.

Installation

Nomad is a Ruby gem so it's super easy to install:

gem install nomad-cli 

Remember how painful installing software used to be...

Nomad has several components to it but I'm going to focus on the two that I actually used. :-)

Houston

Houston allows you to send push notifications to your test device without having to have a complicated script to perform the push. I found this to be an excellent way to intially test push notifications to my application (I know it works so at least one piece isn't broken. :-) )

apn push "<token>" -c /path/to/cert.pem -m "Hello!"

I used this article as a starting point to generate the pem file and used the PHP script it links to as the basis for the site's backend pushing (more on this later).

Shenzhen

I think this is the truely great part of nomad-cli. We use Testflight to distribute our application to our testers and sometimes we generated tens of builds in a day trying to fix problems and getting feedback and the process is a little slow.

  1. Open Xcode
  2. Archive the project
  3. Distribute and sign the project
  4. Upload the project to Testflight
  5. Set who can have access to the build

To speed this up you can use nomad to create the ipa and upload it to TestFlight's servers.

Step 1: Build

The important part of this process is that you need to be inside the ios folder:

cd platforms/ios

And now we can build our solution:

ipa build -s <SolutionName>

Step 2: Distribute

First, we need to do some detective work. We need to find a couple pieces of information on the TestFlight site that will allow us to actually upload the application.

  1. Go to your account (https://testflightapp.com/account/)
  2. Click "Upload API" on the left hand side
  3. On this screen you'll see your upload API token. Keep track of this because we'll use it as the APIKey later. Keep this in a safe place and treat it just like a password (or even safer).

Next we need to find your team API key from your team page (https://testflightapp.com/dashboard/team/edit/). This is the TeamKey we'll use shortly.

Now to the meat and potatoes:

ipa distribute -a <APIKey> -T <TeamKey> -l <ListsToReceiveUpdate>

Where ListsToReceiveUpdate is a comma separated list of the distribution lists you want to have the update. We've gotten in the habit of just making this our own account so we can test it first (I've uploaded broken builds a couple times) and then we use the web interface to give everyone else access.