views:

170

answers:

1

I'm writing a build script to compile and package my app, and I'd like a nice way to get the full path name of the .app created. I can't find any command line tools other than xcodebuild, which doesn't appear to have much in the way of inspecting an Xcode project. My full compile command is

xcodebuild -sdk iphoneos2.2.1

so it'll build with the default configuration, and I don't want to hard-code the .app filename in (although it'll be something like build/<config>iphoneos/<name>.app). Currently, I'm parsing the output from the xcodebuild command and grabbing the line

CodeSign (.*)

which works correctly, but seems like an awfully roundabout way of doing it. Is there another command line tool to do this, or at least an easier way than my solution?

+1  A: 

Tough to say since the build location can be project/target specific or a global preference that's never explicitly set anywhere in the project file.

Never tried it, but maybe add a Run Script build phase to your project that simply prints the environment to stdout and parse that?

Azeem.Butt
I actually did that initially, and then I skimmed the output log and noticed that the `CodeSign` command essentially did that. But I'm looking for a way to do it without parsing the build log.
Jesse Beder