Swift Ruby C
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.circleci Add missing step Aug 9, 2018
.github Rename usages of xpm to tuist Jul 23, 2018
Assets Remove header Apr 30, 2018
Fixtures Rename usages of xpm to tuist Jul 23, 2018
Sources/xcodeproj Add wasCreatedForAppExtension and launchAutomaticallySubstyle attributes Aug 17, 2018
Templates Fix issue with sourcery May 11, 2018
Tests Add some convenient public methods to XCConfigurationList Aug 9, 2018
docs Generate documentation Aug 17, 2018
.editorconfig [jazzy] Add documentation Jul 1, 2017
.gitignore Rename xcproj to xcodeproj Apr 30, 2018
.jazzy.yaml Rename usages of xpm to tuist Jul 23, 2018
.rspec [danger-carthage] Add a Danger plugin to check if the Carthage projec… Dec 13, 2017
.ruby-version Bump Ruby version to 2.5.1 May 10, 2018
.swift-version [linux] Update Swift version to 4.1 Apr 5, 2018
.swiftlint.yml Fix swiftlint issues Aug 8, 2018
CHANGELOG.md Update changelog Aug 17, 2018
CODE_OF_CONDUCT.md Rename usages of xpm to tuist Jul 23, 2018
CONTRIBUTING.md Rename usages of xpm to tuist Jul 23, 2018
Gemfile Remove some Ruby dependencies Aug 9, 2018
Gemfile.lock Remove some Ruby dependencies Aug 9, 2018
LICENSE.md Rename xcproj to xcodeproj Apr 30, 2018
Package.resolved [spm-dep] Remove PathKit and ShellOut and add SPM May 2, 2018
Package.swift Create PBXObjectReference and use it instead of strings to reference … May 10, 2018
README.md Add CircleCI badge Aug 9, 2018
RELEASE.md Rename usages of xpm to tuist Jul 23, 2018
Rakefile Generate documentation Aug 9, 2018
sourcery.yml Organize files in subfolders Aug 8, 2018



Swift Package Manager License

xcodeproj is a library written in Swift for parsing and working with Xcode projects. It's heavily inspired in CocoaPods XcodeProj and xcode.

This project is a fork and evolution from xcproj

Continuous Integration

  • Master: CircleCI


  1. Git clone the repository git@github.com:tuist/xcodeproj.git.
  2. Generate xcodeproj with swift package generate-xcodeproj.
  3. Open xcodeproj.xcodeproj.


Using Swift Package Manager

Add the dependency in your Package.swift file:

let package = Package(
    name: "myproject",
    dependencies: [
        .package(url: "https://github.com/tuist/xcodeproj.git", .upToNextMajor(from: "5.0.0")),
    targets: [
            name: "myproject",
            dependencies: ["xcodeproj"]),

Migrate to xcodeproj 5

xcodeproj 5 is a major release with important changes in the API focused on making it more convenient, and simplify the references handling. This version hasn't been officially released yet but you can already start updating your project for the new version. These are the changes you'd need to make in your projects:

  • xcproj has been renamed to xcodeproj so you need to update all your import statements to use the new name.
  • There's no support for Carthage nor CocoaPods anymore, if you were using them for fetching xcodeproj, you can use the Swift Package Manager and manually setup the dependency.
  • We've replaced Path with AbsolutePath and RelativePath from the Swift Package Manager's Basic framework. You might need to change some of the usages to use the new type.
  • Reference attributes have been renamed to use the naming convention attributeReference where attribute is the name of the attribute. If you are interested in materializing the reference to get the object, objects provide convenient getters that you can use for that purpose. Those getters throw if the object is not found in the project.

There are some useful additions to the API that you can check out on the CHANGELOG.

One of those additions is an improvement on how references are managed. When new objects are added to the project, you get the object reference. The reference is an instance that should be used to refer that object from any other. The value of that reference is an implementation detail that has been abstracted away from you.

Documentation 📄

You can check out the documentation on the following link. The documentation is automatically generated in every release by using Jazzy from Realm.

References 📚