tags:

views:

503

answers:

5

For some reason, the representation in Xcode "Groups & Files" does not match the file hierarchy in the folder where all my real project files are. And for some reason, I can't copy a entire group or even single file and put that into another project. So I have a nice hierarchy of images within "Groups & Files", but all thos ordered images are unordered like a big mess in just one giant folder full of stuff on my file system. Really horrible ;)

So now I wanted to put all my icons into another project, but I cant just copy the Group "img > gui > icons". I have to pick every single icon image from my file system, where icons are mixed up with a few hundred other images and files.

Is there some hidden option I can activate so that Xcode will manage to reproduce the hierarchy of "Groups & Files" inside my project folder on the file system? Or how else could I copy those files?

+1  A: 

Copy icon files in a filtered-Finder window to an "icon-only" folder. Then import them into your new Xcode project. Repeat for any other categories.

Alex Reynolds
A: 

It's not really possible to transplant a Groups hierarchy intact from one project to another. Some suggested approaches:

  • If the files you want to bring across are the vast majority of the project, just clone the project and delete everything that's not the files you want to copy.
  • If it's a lot of files in a small number of groups, then set up the groups in the new project, and drag-copy the files from the old project groups into the new project groups
  • Write an AppleScript to move the hierarchy across with a recursive-descent algorithm
  • ◆◆ Open both project.pbxproj files as text files, and carefully copy the File References and Group References from one to another.
cdespinosa
A: 

Have a look to this other question here

IlDan
A: 

See my previous question here.

Also, file a bug with Apple to let them know you'd like the option to have groups represent the folder structure on disk.

Lawrence Johnston
A: 

In reference to past responses, where is this "clone" function mentioned by cdespinosa?

VK