I have one Xcode project with multiple targets. During development, it is becoming laborious to compile and install each separately.
我有一个包含多个目标的Xcode项目。在开发过程中,单独编译和安装它们变得很费力。
Is there a way, through scripting or otherwise; that I can automate the build and install to device of multiple targets at once.
有没有办法,通过脚本或其他方式;我可以一次自动化构建并安装到多个目标的设备上。
Many thanks in advance!
提前谢谢了!
3 个解决方案
#1
7
Within a target, you can add other targets as dependencies. So pick one that's going to be your "master" target, or just create another target to act as a container for all your other targets, add your other targets as dependencies, and build that.
在目标中,您可以添加其他目标作为依赖项。因此,选择一个将成为您的“主”目标,或者只创建另一个目标作为所有其他目标的容器,将其他目标添加为依赖项,并构建它。
#2
10
Have you tried using xcodebuild
from the command line?
您是否尝试过从命令行使用xcodebuild?
xcodebuild -project projName -alltargets
man xcodebuild
will list all available options.
man xcodebuild将列出所有可用选项。
#3
4
xcodebuild
does also support multiple targets it just does not say it anywhere in the man page or documentation
xcodebuild还支持多个目标,它只是在手册页或文档中的任何地方都没有说明
xcodebuild -target targ1 -target targ2
#1
7
Within a target, you can add other targets as dependencies. So pick one that's going to be your "master" target, or just create another target to act as a container for all your other targets, add your other targets as dependencies, and build that.
在目标中,您可以添加其他目标作为依赖项。因此,选择一个将成为您的“主”目标,或者只创建另一个目标作为所有其他目标的容器,将其他目标添加为依赖项,并构建它。
#2
10
Have you tried using xcodebuild
from the command line?
您是否尝试过从命令行使用xcodebuild?
xcodebuild -project projName -alltargets
man xcodebuild
will list all available options.
man xcodebuild将列出所有可用选项。
#3
4
xcodebuild
does also support multiple targets it just does not say it anywhere in the man page or documentation
xcodebuild还支持多个目标,它只是在手册页或文档中的任何地方都没有说明
xcodebuild -target targ1 -target targ2