Change the working directory in Xcode

Solution 1:

Just updating this solution to XCode 4.x

You go on Product -> Scheme -> Edit Scheme

On the tab Options you choose your working directory.

Solution 2:

In Xcode 4 the working directory settings is under Scheme Settings.

Solution 3:

In Xcode 3.x do a "Get Info" on the executable and look at the first tab - there is a setting there for working directory.

Solution 4:

The default debug working directory is somewhere under ~/Library/Developer/Xcode/DerivedData/project-/Build/Products/Debug. You're better off using the full path.