views:

2658

answers:

2
+3  Q: 

Xcode variables

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: IE 'Release' or 'Debug'. Any ideas?

+5  A: 

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

Naaff
+5  A: 

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

smorgan
I love the way that Xcode refuses to show that page if you type in "build settings" in a search box - you get the OTHER kind of build setting, with no reference to these variables. Ditto if you put "build variables". Someone should teach Apple how to write a search algorithm :)
Adam