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?


Solution 1:

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

Solution 2:

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