Skip to content
This repository was archived by the owner on Feb 26, 2026. It is now read-only.
/ XcodeGraph Public archive

፨ A Swift Package with data structures to model Xcode workspaces and projects

License

Notifications You must be signed in to change notification settings

tuist/XcodeGraph

Repository files navigation

፨ XcodeGraph

All Contributors

XcodeGraph is a Swift Package that contains data structures to model an Xcode projects graph. It was initially developed as part of Tuist and extracted to be Tuist-agnostic.

Important

This package has been merged into the tuist/tuist monorepo.

Installation

To install XcodeGraph, you can add it to your project or package's Package.swift:

let package = Package(
    dependencies: [
        .package(url: "https://github.com/tuist/XcodeGraph.git", .upToNextMajor(from: "0.7.0")),
    ],
)

XcodeGraphMapper

XcodeGraphMapper parses .xcworkspace or .xcodeproj files using XcodeProj and constructs a XcodeGraph.Graph representing their projects, targets, and dependencies:

Usage

import XcodeGraphMapper
let mapper: XcodeGraphMapping = XcodeGraphMapper()
let path = try AbsolutePath(validating: "/path/to/MyProjectOrWorkspace")
let graph = try await mapper.map(at: path)
// You now have a Graph containing projects, targets, packages, and dependencies.*
// Example: print all target names across all projects*
for project in graph.projects.values {
    for (targetName, _) in project.targets {
        print("Found target: \(targetName)")
    }
}

Once you have the Graph, you can explore or transform it as needed—printing targets, analyzing dependencies, generating reports, or integrating into other build tools.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Dariusz Rybicki
Dariusz Rybicki

💻
Binlogo
Binlogo

💻
Filip Racki
Filip Racki

💻
Gabriel Liévano
Gabriel Liévano

💻
Giovanni Filaferro
Giovanni Filaferro

💻
Anton Kolchunov
Anton Kolchunov

💻
Alex Maimescu
Alex Maimescu

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

About

፨ A Swift Package with data structures to model Xcode workspaces and projects

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

 
 
 

Contributors