PBXProj

public final class PBXProj : Decodable

Represents a .pbxproj file

  • Project archive version.

    Declaration

    Swift

    public var archiveVersion: UInt
  • Project object version.

    Declaration

    Swift

    public var objectVersion: UInt
  • Project classes.

    Declaration

    Swift

    public var classes: [String : Any]
  • Project root object.

    Declaration

    Swift

    @available(*, deprecated, message: "Use rootObject instead")
    public var rootObjectReference: PBXObjectReference?
  • Project root object.

    Declaration

    Swift

    public var rootObject: PBXProject? { get set }
  • Initializes the project with its attributes.

    Declaration

    Swift

    public init(rootObjectReference: PBXObjectReference? = nil,
                objectVersion: UInt = 0,
                archiveVersion: UInt = 1,
                classes: [String: Any] = [:],
                objects: [PBXObject] = [])

    Parameters

    rootObjectReference

    project root object.

    objectVersion

    project object version.

    archiveVersion

    project archive version.

    classes

    project classes.

    objects

    project objects

  • Initializes the project with its attributes.

    Declaration

    Swift

    public convenience init(rootObject: PBXProject? = nil,
                            objectVersion: UInt = 0,
                            archiveVersion: UInt = 1,
                            classes: [String: Any] = [:],
                            objects: [PBXObject] = [])

    Parameters

    rootObject

    project root object.

    objectVersion

    project object version.

    archiveVersion

    project archive version.

    classes

    project classes.

    objects

    project objects

  • Declaration

    Swift

    public required init(from decoder: Decoder) throws
  • Returns root project.

    Declaration

    Swift

    public func rootProject() throws -> PBXProject?
  • Returns root project’s root group.

    Declaration

    Swift

    public func rootGroup() throws -> PBXGroup?
  • Infers project name from Path and sets it as project name

    Project name is needed for certain comments when serialising PBXProj

    Declaration

    Swift

    func updateProjectName(path: AbsolutePath) throws

    Parameters

    path

    path to .xcodeproj directory.

  • Declaration

    Swift

    public static func == (lhs: PBXProj, rhs: PBXProj) -> Bool