The names of the file/files in the group will turn red to indicate that Xcode can't find them in the place you specified.Click the Choose button in the bottom-right corner of the dialog box, then close the Group Info/File Info window. Navigate to the folder you want the files to be moved to.Click the Choose button on the far right side of the window in the Path area.The Group Info or File Info window appears. Right/Control-click on the file or file group that you'd like to move and choose Get Info from the contextual menu that appears.Tell Xcode where you want the files to be:.Moving the files is a two-step process with multiple sub-steps: I got the basic information from a question here, Xcode organising files and folders (core data model objects - iPhone), but learned important things along the way. It turns out that moving files into real folders is certainly possible, though not as simple as it should be. Back when this answer was created in 2010 this was the only option I could find. This answer and Brandon's only apply to Xcode 8 and earlier.ĮDITED DECEMBER 2016: Brandon's answer below is a better solution now. 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.įURTHER EDITED JUNE 2017: Xcode 9 does this automatically, no special effort required. 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! All the files inside that group will now be automagically rediscovered! In the Finder selection dialog, locate the equivalent new folder you created for this group in step 2. All the references in Xcode should now be red (that's OK!).įrom the Identity and Type manager, select the Group in Xcode that you want to relocate, then click the folder icon from the info pane:.Create a matching physical folder tree in Finder and organize your physical files into them to match what you did in step 1.Create new groups in the Xcode folder tree and organize your files into them however you like. 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: What am I missing? How can I convince Xcode to let me use the folders the way I use groups? There's an answer here to a somewhat similar question, but it doesn't actually solve my problem since I'm working with existing files.Ī modern (and dead simple!) approach for 2017 (Xcode 6, 7, 8, and sometimes 9, since it does it automagically some of the time): Similarly, I can't move a file from a faux-folder (a group) into a real folder: Xcode doesn't consider the real folders to be valid places to move stuff to. For example, if I right-click on an actual added folder (blue, not yellow) and choose to add existing files, it doesn't actually put them in that folder, it puts them in its root. Unfortunately Xcode doesn't let me work with them the way it does with groups. I'm trying to now reorganize things, creating real folders and importing them into Xcode. However, now that the project is about to be shared for version control, the project folder itself is a horror show for those trying to scan it via a terminal, about 300 files, over half of which are graphics. When I started my project I was happy to use Groups in Xcode rather than literal folders: Since I'm using the browser in Xcode to access everything, stuff was nicely organized and I was happy.
0 Comments
Leave a Reply. |