Every object in objects has an isa key naming its type. These
are the types Xcode writes, as seen in real projects, with the keys each one uses. Apple
does not publish this format, and new Xcode releases add keys, so a project may hold
keys that are not listed here.
The project
isa | Keys |
|---|---|
PBXProject | attributes, buildConfigurationList, compatibilityVersion, developmentRegion, hasScannedForEncodings, knownRegions, mainGroup, packageReferences, productRefGroup, projectDirPath, projectReferences, projectRoot, targets |
Targets
A target builds one product. All targets have buildConfigurationList,
buildPhases, dependencies, name and
productName.
isa | What it is | Own keys |
|---|---|---|
PBXNativeTarget | Compiles a product with Xcode’s build system | buildRules, productReference, productType, packageProductDependencies |
PBXAggregateTarget | Builds nothing itself; groups dependencies and scripts | |
PBXLegacyTarget | Runs an external build tool such as make | buildToolPath, buildArgumentsString, buildWorkingDirectory, passBuildSettingsInEnvironment |
PBXTargetDependency | Says a target needs another first | target, targetProxy, name |
PBXContainerItemProxy | Points at something in this project or another | containerPortal, proxyType, remoteGlobalIDString, remoteInfo |
productType says what the target makes, for example
com.apple.product-type.application,
com.apple.product-type.framework,
com.apple.product-type.library.static,
com.apple.product-type.bundle.unit-test,
com.apple.product-type.tool or
com.apple.product-type.app-extension.
Build phases
Each phase has buildActionMask, files (build files, below)
and runOnlyForDeploymentPostprocessing.
isa | What it does | Own keys |
|---|---|---|
PBXSourcesBuildPhase | Compiles source files | |
PBXFrameworksBuildPhase | Links libraries and frameworks | |
PBXHeadersBuildPhase | Copies public headers | |
PBXResourcesBuildPhase | Copies resources into the product | |
PBXCopyFilesBuildPhase | Copies files to a set place | dstPath, dstSubfolderSpec, name |
PBXShellScriptBuildPhase | Runs a script | name, shellPath, shellScript, inputPaths, outputPaths, showEnvVarsInLog |
PBXRezBuildPhase | Compiles old Mac resource files |
dstSubfolderSpec is a number. Values seen in real projects include 0
(an absolute path), 6 (the executables folder), 7 (resources), 10 (frameworks), 13
(plug-ins) and 16 (the products folder).
PBXBuildFile ties a file into a phase: fileRef names a file
reference, or productRef a Swift package product, and
settings holds per-file options such as compiler flags.
Files and groups
isa | What it is | Keys |
|---|---|---|
PBXFileReference | A file the project knows about | path, name, sourceTree, lastKnownFileType or explicitFileType, fileEncoding, includeInIndex |
PBXGroup | A folder in Xcode’s file navigator | children, name, path, sourceTree |
PBXVariantGroup | One file’s localised versions | children, name, sourceTree |
XCVersionGroup | A versioned file, such as a Core Data model | children, currentVersion, path, sourceTree, versionGroupType |
PBXReferenceProxy | A product of another project | fileType, path, remoteRef, sourceTree |
PBXFileSystemSynchronizedRootGroup | A folder whose contents Xcode reads from the disk (Xcode 16 and later) | path, sourceTree, exceptions |
sourceTree says what a path is relative to: <group>
(the enclosing group), SOURCE_ROOT (the project folder),
BUILT_PRODUCTS_DIR, SDKROOT, DEVELOPER_DIR or
<absolute>.
Build configurations
isa | What it is | Keys |
|---|---|---|
XCConfigurationList | The configurations of a project or target | buildConfigurations, defaultConfigurationIsVisible, defaultConfigurationName |
XCBuildConfiguration | One named set of build settings, such as Debug | name, buildSettings, baseConfigurationReference |
buildSettings is a dictionary of setting names to values, as seen in
Xcode’s Build Settings tab, such as SDKROOT,
PRODUCT_BUNDLE_IDENTIFIER or SWIFT_VERSION.
baseConfigurationReference names an .xcconfig file the
settings are layered on.
Swift packages
isa | What it is | Keys |
|---|---|---|
XCRemoteSwiftPackageReference | A package from a repository | repositoryURL, requirement |
XCLocalSwiftPackageReference | A package in a local folder | relativePath |
XCSwiftPackageProductDependency | One product used from a package | package, productName |