On Sep 11, 2012, at 10:47 , Brian Barnes < email@hidden> wrote: The procedure is this:
1) pick the files I want to include using a right-click/add 2) the files come in, but they are red (these files are outside the project folder) 3) the files import as "relative to group" with a bad absolute path. Note that I am importing them by right-clicking on a group, which might be another cause of the problem 4) change to relative to project, and re-pick the file with the little button next to the file path 5) Now the file has a proper relative path (/../../../ whatever kind of thing)
The problem is I'd like to avoid all these steps. In 3, if I added files, they'd come in as relative and work right. I think it was the addition of all the new (if I'm not mistaken) path types that have messed this up.
Try this:
-- Select the empty group (or create a new empty group).
-- In the info pane on the right, click the "Choose" button.
-- In the Open panel that appears, choose the top level directory of the "outside" hierarchy you want to add. Now the group itself represents the hierarchy, kinda.
-- Add files in the outside hierarchy to the group (using the option to create sub-groups for sub-directories automatically, if that's what you want). Added files should now have no path relative to the group (or, if there are sub-directories, relative paths for just the sub-directories).
It's also possible, if you've already added the files and they show up red, you can fix it directly by choosing the base directory for the group as above, but it depends a bit on what went wrong in the first place (which sounds like an Xcode bug).
AFAIK, Xcode 4 didn't introduce any new path modes (relative to group, etc). In fact, the mechanism generally works a lot better in Xcode 4 -- in 3 it was easy to get into a red-name state you couldn't get out of.
|