A couple of comments for future readers:
1. bash environment variables (export FOO=BAR) will work if XCode is started from the same bash session (open -a xcode)
2. In order to set environment variables that are available to GUI aplications, starting from Mountain Lion launchctl should be used:
http://codepulsive.blogspot.com.au/2013/11/setting-environment-variables-in-os-x.html
3. In order to use environment varialbes in XCode 7, the following command must be issued: defaults write com.apple.dt.Xcode UseSanitizedBuildSystemEnvironment -bool NO
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)