<aside> 📦

What is XcodeGen?

XcodeGen is a command-line tool that generates your .xcodeproj file from a simple, human-readable YAML configuration project.yml.

Normally, Xcode stores all project settings, targets, and file references in a large, complex .pbxproj file inside the .xcodeproj bundle. Editing this file directly is messy and prone to errors.

With XcodeGen, you don’t touch the .pbxproj at all - instead, you define everything (like targets, build settings, sources, and Info.plist paths) in project.yml. It keeps your repository clean since there is no committing of .pbxproj or .xcworkspace files.

Whenever something changes, you just run xcodegen and it generates a fresh, consistent .xcodeproj for you locally.

<aside> ↕️

Connection between project.yml, .xcodeproj, and Info.plist

You define your project structure and settings in project.yml, including the path to your Info.plist.

When you run XcodeGen, it generates the .xcodeproj file based on the YAML configuration and links the specified Info.plist.

The Info.plist itself is not generated, you still manage it separately, but XcodeGen ensures it’s correctly connected to the target.

<aside> ⚠️

Project settings & Dependencies

Using XCodeGen means any build settings, SPM dependencies, and project settings need to be defined in your project.yaml.

Changes done directly in XCode target/project settings will not be synced, since the *.xcodeproj file is ignored.

</aside>

</aside>

<aside> 💡

Why should you use XcodeGen?

<aside> ⚡

Project Setup with XcodeGen

<aside> 🔗

Links

Introducing XcodeGen

Create Your Xcode Project

Version Control

XcodeGen

Deployment Session (access might be restricted)

</aside>