AARON SMITH’S CODE ENDEAVOR

Evironment Variables in Xcode

When you’re writing scripts in xcode you’ll need to know what environment variables xcode exposes.

Here’s how you can find them all:

-make a new empty xcode cocoa project
-add a new “run script build phase phase” to the app target
-add this as the script:

env > ENV

-build the project.

There will be file in the project directory called “ENV”, which lists all environment variables. Which comes in really handy as a reference.

  

1 Comment so far

  1. Craig Williams November 24th, 2009 9:32 am

    Nice tip! Thanks for sharing. :)

Leave a reply