[翻译]  How do I archive multiple targets with one action in xcode 4

[CHINESE]  如何在xcode 4中使用一个操作归档多个目标


I have a project with multiple targets that are all for different iOS Apps. For instance one traget for the lite version and another one for the pro version.

我有一个包含多个目标的项目,这些目标都适用于不同的iOS应用。例如,精简版的一个traget和专业版的另一个traget。

I want to build and archive all of my Apps at once. Currently I have a scheme for every target which I use to archive each app independently. But now I have to start the archiving, wait until it is done and then start the next one.

我想一次构建和存档我的所有应用程序。目前,我有一个针对每个目标的方案,我用它来独立存档每个应用程序。但是现在我必须开始存档,等到它完成然后开始下一个存档。

Is there a way to archive all apps with one single action in xcode 4 or using the command line?

有没有办法在xcode 4中使用一个操作或使用命令行归档所有应用程序?

2 个解决方案

#1


4  

The Build action in a scheme dictates what targets are built for what actions. Leave the defaults (so they'll all be built for the Archive action). When that scheme is active, it'll build all the requested targets just prior to archiving when you select Product -> Archive.

方案中的构建操作决定了针对哪些操作构建的目标。保留默认值(因此它们都将为Archive操作构建)。当该方案处于活动状态时,当您选择产品 - >存档时,它将在存档之前构建所有请求的目标。

You could create a new scheme called "All", edit it, then in its Build action, add all targets you want to archive. Then just select that scheme and ask it to archive.

您可以创建一个名为“All”的新方案,对其进行编辑,然后在其Build操作中添加要归档的所有目标。然后只需选择该方案并要求其存档。

Alternatively, add all targets to your existing scheme and uncheck unwanted actions for which it should build those extra targets, leaving only Archive.

或者,将所有目标添加到现有方案中,并取消选中应该为其构建这些额外目标的不需要的操作,只留下存档。

#2


2  

You can use xcodebuild from the commandline

您可以从命令行使用xcodebuild

e.x. xcodebuild -configuration Release -project MyProject -scheme MyProjectScheme clean build

e.x. xcodebuild -configuration发布 - 项目MyProject -scheme MyProjectScheme clean build

Also you can use xcrun to build an ipa from the commandline as well, see: https://stackoverflow.com/a/4198166/618419

您也可以使用xcrun从命令行构建ipa,请参阅:https://stackoverflow.com/a/4198166/618419


注意!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系我们删除。



 
© 2014-2018 ITdaan.com 粤ICP备14056181号