tags:

views:

297

answers:

3

Hello, I would like to add a script that zips the executable after my iphone app is done building. I've tried doing this by adding a Post Build script to the target. However, in the build process, the code-signing procedure occurs after the build scripts are run. Therefore, the app bundle that is zipped is useless for itunes submission.

Has anyone figured out a way around this?

One suggestion I have found via google is to add an aggregate target that contains the iphone app and add the post build script to this aggregate target. Although this method sounds nice if you have only a single app target in your project, it appears to not work so well if you have multiple targets, which is my case (ie. lite, paid, etc...)

Thank you

A: 

How about an aggregate of aggregates?

  1. Create an aggregate for each target that zip each target
  2. Create an aggregate of each aggregate
epatel
I thought of doing that, but it just seems really messy. Is this really the only way?
+1  A: 

You could try setting a Folder Action on your build folder, then do the compression via an Apple Script.

August
A: 

Xcode 3.2.2 now includes a Build and Archive option on the Build menu. As long as you have Device + Release (or Distribution) selected, it will be available for selection. It will build your project, archive it for you and then open the Organizer to "Archived Applications" where you can Validate the binary, Share it (adhoc) or Submit it to iTunes Connect for distribution.

hjd