Xcode variables

2019-03-07 12:58发布

问题:

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., Release or Debug). Any ideas?

回答1:

The best source is probably Apple's official documentation. The specific variable you are looking for is CONFIGURATION.



回答2:

Here's a list of the environment variables. I think you might want CURRENT_VARIANT. See also BUILD_VARIANTS.