This has been answered above, but I wanted to suggest an alternative.
When in the Build Settings for you project or target, you can go to the Editor menu and select Show Setting Names
from the menu. This will change all of the options in the Build Settings pane to the build variable names. The option in the menu changes to Show Setting Titles
, select this to change back to the original view.
This can be handy when you know what build setting you want to use in a script, toggle the setting names in the menu and you can see the variable name.