Moving Files into a Real Folder in Xcode

A modern (and dead simple!) approach for 2017 (Xcode 6, 7, 8, and sometimes 9, since it does it automagically some of the time):

If you’re moving a bunch of files into a new folder and are keeping the child hierarchy, it’s actually a lot easier than moving each file individually:

  1. Create new groups in the Xcode folder tree and organize your files into them however you like.
  2. Create a matching physical folder tree in Finder and organize your physical files into them to match what you did in step 1.
  3. All the references in Xcode should now be red (that’s OK!).
  4. From the Identity and Type manager, select the Group in Xcode that you want to relocate, then click the folder icon from the info pane:

  5. In the Finder selection dialog, locate the equivalent new folder you created for this group in step 2. All the files inside that group will now be automagically rediscovered!

Isn’t that nice? At most you’ll have to repeat these 5 steps once for each new group you’ve created (which beats relocating each file individually!)

Bonus Points!

Say you accidentally screwed up the move and now a bunch of your files are red and can’t be found: select multiple files that are broken, and using the same folder icon in the screenshot from step 4, find the correct folder that contains these files and they’ll automatically resolve the missing paths.

Leave a Comment