tags:

views:

501

answers:

4

When I started working on my first app, i assumed dragging files into xcode put them in my project's actual directory. Not so. Apparently, xcode references them all on the desktop.

Is there an easy way to copy all referenced files into the project directory? My desktop is a mess.

+1  A: 

From Xcode, you can right-click the project and select "Add -> Existing files..." When you have selected all your files, click "Add," then select the check box at the top "Copy files..."

Andy White
I know how to do it for new files, I need to find a way to do it for files i already referenced.
midas06
+1  A: 

There really isn't a straightforward way to do this once you've added the references to the XCode project. One solution (although tedious and slightly scary) is to remove the references from XCode and re-drag these files into your project with the "Copy files..." option checked.

danvin
+1  A: 

Use the Finder to relocate all the files to where you want them. Then, open your XCode projects, and for each file that's missing (shown in red), use the Get Info command and edit the path.

Mark Bessey
A: 

Even when you check the "Copy files ..." checkbox when you drag your files in, it's done "When necessary", without telling us when it thinks it's deemed not necessary to copy the files. I'd find that the best way to check if a bundle is self-contained is to compress it to .zip (the entire folder), move it to a temp folder, decompress and then go through all the files, or simply compile and run.

It's amazing that xcode doesn't have a consolidate function like itunes does.

Ben