Skip to content

ProjectKit is a macOS Swift framework for parsing Xcode project files.

License

apparata/ProjectKit

Repository files navigation

ProjectKit

ProjectKit is a Swift framework for parsing Xcode project files.

Example

Here's an example that loads an Xcode project file and prints the name of all targets in the project.

import ProjectKit

let url = URL(fileURLWithPath: "<YourProject>.pbxproj")

do {
    
    let project = try XcodeProject(url: url)

    print(project)
    
    for (targetID, target) in project.nativeTargets {
        print(target.name)
    }

} catch XcodeProjectError.failedToOpenProjectFile {
    print("Failed to open project file.")
} catch XcodeProjectError.failedToParseProjectFile {
    print("Failed to parse project file.")
}

About

ProjectKit is a macOS Swift framework for parsing Xcode project files.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published