The project itself is one text file, project.pbxproj, inside the
.xcodeproj folder. It is an
old-style property list, and it is the
last common file written in that form. Xcode writes the objects sorted by type, with a
comment line around each type, so that merges and diffs stay readable.
The top level
The file starts with the comment line // !$*UTF8*$!, which says the text
is UTF-8. Then a single dictionary:
| Key | Value |
|---|---|
archiveVersion | Written as 1. |
classes | An empty dictionary. |
objectVersion | The file format’s version, a number that rises with Xcode releases. |
objects | A dictionary of every object in the project, keyed by ID. |
rootObject | The ID of the PBXProject object. |
Objects and IDs
Each entry in objects is a dictionary with an isa key naming
its type. Its key is an ID, normally 24 hexadecimal digits, and objects refer to each
other by those IDs. Comments after IDs, such as /* main.swift */, repeat a
name for the reader; they are not part of the data.
The whole project hangs from the root object: rootObject names the
PBXProject, whose targets name the targets, and so on. See
the object types.
What reads it
A project.pbxproj dropped on this site opens in the explorer, with the
targets, build phases, file references and build settings read from its objects.