Information Technology Reference
In-Depth Information
Optionally, you can copy files from the source folder into the project folder. If you leave the Destination box un-
checked, files are left in their original location and accessed via a reference. Generally, it's good practice to copy
files that are unique to the project, but to use references for files that are reused by many projects.
You can also create groups or folder references for added folders. Although I've emphasized that groups aren't
necessarily mirrored in a project's folder structure, you can use this option and the group management features
introduced in the next section to create folders on disk that match the groups in the Project Navigator. This step
isn't essential, but it can make a project easier to navigate if you're reusing its classes and resources.
Reimporting missing files
As long as you leave a file's Location option set to Relative to Group in the File pane of the Utility Area, you can
move a project folder to a different location on disk without breaking the file references.
However, Xcode does occasionally glitch and lose files from a project. If you move items that are referenced in-
directly in a different folder, Xcode may not be able to find them. And if you import a project created by an
older version of Xcode, the Location option may not have been set correctly.
Broken references appear in the Project Navigator in red. As long as you can find the original file on disk, you
can fix a broken reference by hand. Click the window-like icon to the right of the text box above the Full Path
string in the File pane. You'll see the folder selector shown in Figure 5.10. Use it to navigate to the folder that
holds the missing file, and select it when done. Xcode repairs the reference.
Search WWH ::




Custom Search