开发者

How to get the app path name from an Xcode project on the command line?

I'm writing a build script to compile and package my ap开发者_如何学运维p, 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?


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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜