[英]xcodebuild - how to use build settings from xcode
I'm trying to build several targets and I already have Build Settings per target in Xcode. 我正在尝试构建多个目标,并且在Xcode中已经有每个目标的构建设置。 I also have a scheme per target.
我也有针对每个目标的方案。 What I'm trying to do is issue one command line instruction to build each target, something like:
我要执行的操作是发出一个命令行指令来构建每个目标,例如:
xcodebuild - project MyProject.xcodeproj - scheme PRODScheme archive - archivePath /Users/myUser/Documents/PRODApps/archives/"${PRODUCT_NAME}".xcarchive - configuration Release
xcodebuild- 项目 MyProject.xcodeproj- 方案 PRODScheme存档-archivePath /Users/myUser/Documents/PRODApps/archives/"${PRODUCT_NAME}".xcarchive- 配置发行版
Here, ${PRODUCT_NAME} is the Build Setting variable defined by XCode. 在这里,$ {PRODUCT_NAME}是XCode定义的Build Setting变量。 I'm thinking on how xcodebuild can make use of the bunch of already defined settings.
我在考虑xcodebuild如何利用一堆已经定义的设置。
Is there a way of reusing those settings in xcodebuild? 有没有一种方法可以在xcodebuild中重用这些设置?
Typically you would use the scheme
, which would contain the other information you are trying to include: 通常,您将使用
scheme
,其中将包含您尝试包括的其他信息:
xcodebuild -scheme PRODScheme build
To use with a configuration file you would use: 要与配置文件一起使用,可以使用:
xcodebuild -target MyProject.xcodeproj -xcconfig configuration.xcconfig
To build all targets use -alltargets
要构建所有目标,请使用
-alltargets
Command Line tech notes: https://developer.apple.com/library/ios/technotes/tn2339/_index.html 命令行技术说明: https : //developer.apple.com/library/ios/technotes/tn2339/_index.html
Man xcodebuild: https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/xcodebuild.1.html Man xcodebuild: https : //developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/xcodebuild.1.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.