Introduction
An .xcodeproj is a project for Apple’s
Xcode, used to build apps for macOS,
iOS and Apple’s other systems. It records the project’s source files and how they are
grouped, the targets it builds (apps, frameworks, extensions and tests), the build
phases and build settings of each target, and the packages it depends on.
Although Finder shows it as one file, an .xcodeproj is a folder. The
project itself is the file project.pbxproj inside it; the folder also holds
shared schemes and per-user settings. Several projects can be gathered in an
.xcworkspace.
Structure
project.pbxproj is a text file in the old-style property list format
from NeXTSTEP, with dictionaries in braces, arrays in parentheses and
key = value; pairs. It starts with the line // !$*UTF8*$!. The
top-level dictionary holds archiveVersion, objectVersion, an
objects dictionary and the ID of the rootObject.
Every part of the project is an entry in objects, keyed by a 24-digit
hexadecimal ID and given an isa type: PBXProject,
PBXNativeTarget, PBXFileReference, PBXGroup,
build phases such as PBXSourcesBuildPhase, and
XCBuildConfiguration for each set of build settings. Objects refer to each
other by ID. Because many people edit the same file, merge conflicts in it are a
familiar problem.
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 56;
objects = {
…
};
rootObject = 8D1107260486CEB800E47090 /* Project object */;
}