views:

529

answers:

1

I have prior experience in build a automatic build process for .NET & Delphi projects but now want to automate the building of a iPhone project... not only simply builds but also to the final deployment..

I want a generic step list, with the command line actions that need to be performed, so anyone could adapt it to their particular build software.

Also, how build with support for 3.0 and 2.0 targets (or more general: How build to diferent deployments targets???)

So:

Preparation:

  • Set support for application versioning with agvtool.

Build steps:

  • Checkout the sourcecode
  • Clean the project
  • Increase the version: agvtool bump -all
    • If is for deployment also run: agvtool new-marketing-version <new version here>
  • Build the project (how?)
  • Build the test suite
  • Run the test suite

What more?

+3  A: 

Building the target is the easiest of the pieces. Use xcodebuild. It can easily target separate SDKs. It's also the tool that will build your test suites for you (by using a separate target generally). I recommend relying on xcodebuild as much as possible. I've only seen heartache come from trying to wrap xcodebuild calls with make, jam or ant. You have to build with xcodebuild eventually, so it's worth studying the Xcode Build System Guide and learning to make the most use of it. It's quite powerful. I have a few introductions to configuring it here.

Running the test suite is more difficult to automate for iPhone (especially if you need to test on device). There have been other discussions of this. For many apps, you may not be able to fully automate this step.

Rob Napier