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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 03:02:49  来源:igfitidea点击:

Xcode variables

xcodevariablesbuild-processbuild-automation

提问by Allyn

In Xcode, I know that you can get variables such as PROJECT_DIRto 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在某些情况下使用,例如运行脚本构建阶段。我想知道是否有可能获得构建类型(即ReleaseDebug)。有任何想法吗?

回答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