Xcode 4: Removing Files from a Project

May 9th, 2011

Filed under: Xcode | Be the first to comment!

To remove a file from an Xcode project, select the file from the project navigator and press the Delete key. An alert like the following opens:


If you want to delete the file, the safest thing to do is click the Remove Reference Only button, then move the file to the Trash. Clicking the Delete button permanently deletes the file, which means the only ways to recover the file are to restore a backup or use a data recovery tool. Unless you’re absolutely sure you want to delete the file, click the Remove Reference Only button.

Update: May 2012

I noticed in Xcode 4.3.2 that the Delete button referenced in the screenshot now says Move to Trash. I’m not sure which version of Xcode introduced this change as I don’t delete files from projects often.


Leave a Reply

Your email address will not be published. Required fields are marked *