On May 13, 2009, at 1:18 PM, Aroon Pahwa wrote: Anyone have any preference for one over the other? Why? Are there any pitfalls or caveats regarding Folder References?
Groups are simply an organizational convenience in the Groups and Files view for organizing your files. They're like playlists in iTunes or albums in iPhoto: they collect things, but don't change where they are on disk.
You can associate a group with a directory on disk so that new files created in that group are stored in that folder, but it doesn't enforce much if any other file-system behavior.
A folder reference (blue folder) is entirely different. It is a single entry that directly and irrevocably represents a directory in the file system, and its entire contents. You can view the contents of the folder and edit the files contained in it, but the folder reference’s contents are not project members individually. Only the folder itself is.
The advantage of this is that you can use the folder reference as a proxy for "copy the entire contents of this folder, regardless" in a Copy Files or Copy Bundle Resources build phase. Which means you can add art, documentation, etc. without thrashing your project file.
The disadvantage is that the files in the folder are not under Xcode's SCM control; their contents and timestamps are not scanned by Xcode to force a re-copy or re-build if they're changed; you and a co-worker may have identical projects that build and behave differently because the contents of the folder reference happen to be different.
Chris |