Important: The information in this document is obsolete and should not be used for new development.
Xcode stores the location, or path, for each file, framework, and folder in a project. Xcode uses this path to locate the item. Xcode can store this as an absolute path or relative to another file system location. You choose the way that a given file, framework, or folder is referenced when you add it to the project. You can also change the reference type for an item in the file inspector. Xcode supports the following reference styles, each of which is available in the Reference Type menu:
Relative to Enclosing Group. The path is relative to the folder associated with the file’s group. If the file is not in a group or the group has no associated folder, the path is relative to the project’s folder. This is the default setting for files in your project’s folder.
Relative to Project. The path is relative to the project’s folder, regardless of whether the file is in a group with an associated folder.
Relative to Build Product. The path is relative to the folder that contains the project’s build products. This reference style is the default for items that are created by one of the project’s targets.
Relative to source path. The path is relative to a user-defined source path. You can define a source path in the Source Trees pane of Xcode Preferences. Note that this reference type is not available to you until you have defined at least one source tree.
Absolute Path. The path is absolute from the root directory (/). This is useful in a limited set of circumstances, when you want to locate a file at a particular path. In most cases, you should use a relative path; absolute paths are fragile and break easily when you move projects between computers.
If a file is inside your project folder or its build folder (created by Xcode when it creates a new project), use one of the first three reference styles.
If Xcode can’t find a file, folder, or framework at the path stored for it in the project, Xcode displays the item in red in the project window.
Last updated: 2006-11-07