简体   繁体   English

xcodebuild-如何使用xcode中的构建设置

[英]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.

相关问题 如何从1 xcode项目中保存所有构建设置并在其他xcode项目中使用它们? - How can I save all my build settings from 1 xcode project and use them on other xcode projects? 您如何确定XCode使用的构建选项,以便可以将它们与xcodebuild一起使用? - How do you determine the build options that XCode uses so you can use them with xcodebuild? 如何从xcode显示xcodebuild命令行? - How to show the xcodebuild command line from xcode? 从 Xcode 构建脚本/ xcodebuild 中排除应用程序扩展 (WatchKit) - Exclude App Extension (WatchKit) from Xcode build script / xcodebuild 使用 xcodebuild 构建 Xcode 框架 - Build Xcode Framework using xcodebuild 从捆绑的javascript使用Xcode(自定义)构建设置或预处理程序指令 - Use Xcode (custom) Build Settings or Preprocessor Directives from bundled javascript Xcode:如何使xcodebuild构建一个包含子项目的项目 - Xcode: How to make xcodebuild build a project that contains sub-projects 如何在Xcode 6中访问Build Settings? - How to access Build Settings in Xcode 6? 如何在构建设置中从xcode 7.2删除配置文件 - how to delete provisioning profile from xcode 7.2 in build settings 如何使用xcodebuild命令行对Xcode9进行自动签名? - How to use xcodebuild command line to do automatic signing with Xcode9?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM