Why can't I clean?

I’m new to AS Studio (XCode actually) but it’s not the scripting part that’s throwing me or even creating and interacting with NIBs. It’s the repeated build and clean part. After I build and run a project once and then change something and try to build it again, my builds fail with errors like this:

pbxcp: /tmp/TimeLog_B.dst//Applications/Utilities/Time Log Application/Time Log.app/Contents/Info.plist: Permission denied
pbxcp: error: open(): /tmp/TimeLog_B.dst//Applications/Utilities/Time Log Application/Time Log.app/Contents/Info.plist: Permission denied

If I try to clean, my clean fails with the message:

rm: /tmp/TimeLog_B.dst//Applications/Utilities/Time Log Application/Time Log.app/Contents/Resources: Permission denied
rm: /tmp/TimeLog_B.dst//Applications/Utilities/Time Log Application/Time Log.app/Contents: Permission denied
rm: /tmp/TimeLog_B.dst//Applications/Utilities/Time Log Application/Time Log.app: Directory not empty …failed Clean.Remove clean …

If I go into Terminal and make my way to the tmp directory where the temporary build files are, I can sudo rm the .app there (in this case “Time Log.app”) and then I’m free to clean and rebuild.

It sounds like a permissions problem but I don’t know how to configure things so that XCode has the proper permissions to clean.

Any ideas?

Try moving your project (or at least the build location) out of the Utilities folder (it is not a “normal” folder), for example your desktop or any folder withing your home hierarchy.

Can I control that. I know I can choose where I save the project and that’s where the builds are saved as well. But it also looks like a copy is saved to the following root directory:

/tmp/TimeLog_B.dst//Applications/Utilities/Time Log Application/Time Log.app

This is the one that clean cean’t seem to get rid of and that I have to remove with Terminal. Is this some sort of temporary file or is the build file saved in the project folder just an alias?

Unless you add a new “custom executable”, the app is built in a folder next to your .pbproj/.xcode project (I think)