Xcode 变量
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/890569/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Xcode variables
提问by Allyn
In Xcode, I know that you can get variables such as PROJECT_DIR
to use in some situations, such as a run script build phase. I am wondering if it's possible to get the build type (i.e., Releaseor Debug). Any ideas?
在 Xcode 中,我知道您可以获得变量,例如PROJECT_DIR
在某些情况下使用,例如运行脚本构建阶段。我想知道是否有可能获得构建类型(即Release或Debug)。有任何想法吗?
回答by smorgan
The best source is probably Apple's official documentation. The specific variable you are looking for is CONFIGURATION.
最好的来源可能是Apple 的官方文档。您正在寻找的特定变量是 CONFIGURATION。
回答by Naaff
Here's a list of the environment variables. I think you might want CURRENT_VARIANT
. See also BUILD_VARIANTS
.
这是环境变量的列表。我想你可能想要CURRENT_VARIANT
。另见BUILD_VARIANTS
。