Friday, November 1, 2013

Xcode project file structure

The root item is a dictionary whose key is "objects", all other items are children of this root item. Each subitem has a ias property to indicate the item's type. The ias may include the following item types:

Items showing in project navigation page:

PBXFileReference
Represent each file item in the project, those items show in the project navigation view.

PBXBuildFile
Represent each file in the settings's build phase page, it references the file in PBXFileReference group

PBXGroup
Represent each folder in project navigation view, it includes items in PBXFileReference group


Items show in project build settings page:
PBXProject
Represent the build project, it includes the subitem of PBXNativeTarget, and XCConfigurationList

PBXNativeTarget
Represent the build target, it includes the subitem of XCConfigurationList, and different build phase

XCConfigurationList
Represent the list of build settings for project or target, it contains subitems of XCBuildConfiguration

XCBuildConfiguration
Represent build settings

Items show in build phase page, they are linked to a target:
PBXTargetDependency
Represents each item in build phase dependency section

PBXFrameworksBuildPhase
Represents each library showing in the build phase "Link Binary with Library" page

PBXResourcesBuildPhase
Represents each item showing in "Copy bundle Resource" page

PBXSourcesBuildPhase
Represent each item showing in "Compile sources" page

The whole xcode project file is a plist file connecting all items under root object.

2 comments: