Skip to content
Xcode projects on steroids
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin Renamed xcodegen to struct Feb 25, 2017
examples Added support for all tvOS targets May 24, 2017
lib Version 3.2.1 Dec 19, 2018
spec Add project container to tests action in scheme (#168) Dec 19, 2018
.rubocop.yml Fixed target_metadata issue where filenames would not be properly added May 31, 2017
.travis.yml Updated travis osx_image Sep 23, 2017 Added contributor code of conduct Mar 12, 2017
struct.gemspec Updated required Ruby to match High Sierra, removed Ruby 2.0.0 hacks Sep 23, 2017

Struct logo


Latest Gem Release Git Version Git Version Build status Coverage Status Help Contribute to Open Source


struct is a tool for iOS and Mac developers to automate the creation and management of Xcode projects.

Ever lamented over your unorganised project files? struct solves that by making your filesystem be your project structure. How it is on disk is how it is in your project. Simple.

Need to have multiple variants of a project depending on how you're distributing to your customers? struct's got you covered with target variants. Now you get a project for each variant, with the ability to add additional source files and resources. Great for whitelabelling and multiple distribution channels!

struct makes working with Xcode easy. You get simple, predictable project files that any developer can understand. Just treat your Xcode projects as a build artifact and feel the weight lift off your shoulders.

Use a spec file to define your project:

version: 2.2.0
    sources: src
    i18n-resources: res
    platform: ios
    type: ":application"
      INFOPLIST_FILE: Info.plist

Then just run struct generate and struct will do the rest.

You can find documented examples of the project specification in the examples folder.


struct requires a minimum of Ruby 2.2.0, which is available in macOS High Sierra. You can install a higher version of Ruby with RVM on an older macOS version.

Install struct from Rubygems:

You may need to use sudo when using the system-provided Ruby

$ gem install struct

Quick Start

Get started with adding struct to your app:

Create your first spec file

Available Commands

To generate an Xcode project from your spec file, run the following from your project directory:

$ struct generate

To start the file watcher, run the following from your project directory:

$ struct watch

The project will be automatically regenerated whenever the project or any source files change.

Other commands can be discovered by viewing help:

$ struct help


Bug reports and pull requests are welcome on GitHub at

You can’t perform that action at this time.