>Project

Project

This class represents a Xcode project document.

It can be used to manipulate existing documents or even create new ones from scratch.

An Xcode project document is a plist file where the root is a dictionary containing the following keys:

  • archiveVersion: the version of the document.
  • objectVersion: the version of the objects description.
  • classes: a key that apparently is always empty.
  • objects: a dictionary where the UUID of every object is associated to its attributes.
  • rootObject: the UUID identifier of the root object (PBXProject).

Every object is in turn a dictionary that specifies an isa (the class of the object) and in accordance to it maintains a set attributes. Those attributes might reference one or more other objects by UUID. If the reference is a collection, it is ordered.

The Project API returns instances of AbstractObject which wrap the objects described in the Xcode project document. All the attributes types are preserved from the plist, except for the relationships which are replaced with objects instead of UUIDs.

An object might be referenced by multiple objects, an when no other object is references it, it becomes unreachable (the root object is referenced by the project itself). Xcodeproj takes care of adding and removing those objects from the objects dictionary so the project is always in a consistent state.

Inherits from:

Object

Child Name Spaces

Xcodeproj::Project::Object

Xcodeproj::Project::ObjectDictionary

Xcodeproj::Project::ObjectList

Xcodeproj::Project::ProjectHelper

Plist serialization

Creating objects

Convenience accessors

Helpers for generating objects