A Swift command line tool for generating your Xcode project

Overview

XcodeGen

Swift Package Manager Platforms Swift Versions

XcodeGen

XcodeGen is a command line tool written in Swift that generates your Xcode project using your folder structure and a project spec.

The project spec is a YAML or JSON file that defines your targets, configurations, schemes, custom build settings and many other options. All your source directories are automatically parsed and referenced appropriately while preserving your folder structure. Sensible defaults are used in many places, so you only need to customize what is needed. Very complex projects can also be defined using more advanced features.

  • Generate projects on demand and remove your .xcodeproj from git, which means no more merge conflicts!
  • Groups and files in Xcode are always synced to your directories on disk
  • Easy configuration of projects which is human readable and git friendly
  • Easily copy and paste files and directories without having to edit anything in Xcode
  • Share build settings across multiple targets with build setting groups
  • Automatically generate Schemes for different environments like test and production
  • Easily create new projects with complicated setups on demand without messing around with Xcode
  • Generate from anywhere including on CI
  • Distribute your spec amongst multiple files for easy sharing and overriding
  • Easily create multi-platform frameworks
  • Integrate Carthage frameworks without any work
  • Export Dependency Diagrams to view in Graphviz

Given an example project spec:

name: MyProject
include:
  - base_spec.yml
options:
  bundleIdPrefix: com.myapp
packages:
  Yams:
    url: https://github.com/jpsim/Yams
    from: 2.0.0
targets:
  MyApp:
    type: application
    platform: iOS
    deploymentTarget: "10.0"
    sources: [MyApp]
    settings:
      configs:
        debug:
          CUSTOM_BUILD_SETTING: my_debug_value
        release:
          CUSTOM_BUILD_SETTING: my_release_value
    dependencies:
      - target: MyFramework
      - carthage: Alamofire
      - framework: Vendor/MyFramework.framework
      - sdk: Contacts.framework
      - sdk: libc++.tbd
      - package: Yams
  MyFramework:
    type: framework
    platform: iOS
    sources: [MyFramework]

A project would be created with 2 connected targets, with all the required configurations and build settings. See the Project Spec documentation for all the options you can specify, and Usage for more general documentation.

Installing

Make sure Xcode 11 is installed first.

Mint

mint install yonaskolb/xcodegen

Make

git clone https://github.com/yonaskolb/XcodeGen.git
cd XcodeGen
make install

Homebrew

brew install xcodegen

Swift Package Manager

Use as CLI

git clone https://github.com/yonaskolb/XcodeGen.git
cd XcodeGen
swift run xcodegen

Use as dependency

Add the following to your Package.swift file's dependencies:

.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.23.1"),

And then import wherever needed: import XcodeGenKit

Usage

Simply run:

xcodegen generate

This will look for a project spec in the current directory called project.yml and generate an Xcode project with the name defined in the spec.

Options:

  • --spec: An optional path to a .yml or .json project spec. Defaults to project.yml
  • --project: An optional path to a directory where the project will be generated. By default this is the directory the spec lives in.
  • --quiet: Suppress informational and success messages.
  • --use-cache: Used to prevent unnecessarily generating the project. If this is set, then a cache file will be written to when a project is generated. If xcodegen is later run but the spec and all the files it contains are the same, the project won't be generated.
  • --cache-path: A custom path to use for your cache file. This defaults to ~/.xcodegen/cache/{PROJECT_SPEC_PATH_HASH}

There are other commands as well such as xcodegen dump which lets out output the resolved spec in many different formats, or write it to a file. Use xcodegen help to see more detailed usage information.

Dependency Diagrams

Click to expand!

How to export dependency diagrams:

To stdout:

xcodegen dump --type graphviz

To a file:

xcodegen dump --type graphviz --file Graph.viz

During implementation, graphviz formatting was validated using GraphvizOnline, WebGraphviz, and Graphviz on MacOS.

Editing

git clone https://github.com/yonaskolb/XcodeGen.git
cd XcodeGen
swift package generate-xcodeproj

This uses Swift Package Manager to create an xcodeproj file that you can open, edit and run in Xcode, which makes editing any code easier.

If you want to pass any required arguments when running in Xcode, you can edit the scheme to include launch arguments.

Documentation

  • See Project Spec documentation for all the various properties and options that can be set
  • See Usage for more specific usage and use case documentation
  • See FAQ for a list of some frequently asked questions
  • See Examples for some real world XcodeGen project specs out in the wild

Alternatives

If XcodeGen doesn't meet your needs try these great alternatives:

Attributions

This tool is powered by:

Inspiration for this tool came from:

Contributions

Pull requests and issues are always welcome. Please open any issues and PRs for bugs, features, or documentation.

License

XcodeGen is licensed under the MIT license. See LICENSE for more info.

Comments
  • Brew install does not currently work

    Brew install does not currently work

    Using the instructions from the README I currently get this:

    brew install xcodegen
    ==> Installing xcodegen from yonaskolb/xcodegen
    ==> Downloading https://github.com/yonaskolb/XcodeGen/archive/0.6.1.tar.gz
    Already downloaded: /Users/dbeard/Library/Caches/Homebrew/xcodegen-0.6.1.tar.gz
    ==> Building XcodeGen
    ==> swift build -c release -Xlinker -rpath -Xlinker @executable_path -Xswiftc -static-stdlib
    Last 15 lines from /Users/dbeard/Library/Logs/Homebrew/xcodegen/01.swift:
    2017-09-13 12:02:33 -0700
    
    swift build -c release -Xlinker -rpath -Xlinker @executable_path -Xswiftc -static-stdlib
    
    error: manifest parse error(s):
    sandbox-exec: sandbox_apply_container: Operation not permitted
    
    If reporting this issue please do so to (not Homebrew/brew or Homebrew/core):
    yonaskolb/xcodegen
    
    /usr/local/Homebrew/Library/Homebrew/utils/github.rb:226:in `raise_api_error': curl failed!  (GitHub::Error)
    curl: (22) The requested URL returned error: 422 Unprocessable Entity
    curl: (3) <url> malformed
    	from /usr/local/Homebrew/Library/Homebrew/utils/github.rb:184:in `open'
    	from /usr/local/Homebrew/Library/Homebrew/utils/github.rb:284:in `search'
    	from /usr/local/Homebrew/Library/Homebrew/utils/github.rb:231:in `search_issues'
    	from /usr/local/Homebrew/Library/Homebrew/utils/github.rb:244:in `issues_for_formula'
    	from /usr/local/Homebrew/Library/Homebrew/exceptions.rb:369:in `fetch_issues'
    	from /usr/local/Homebrew/Library/Homebrew/exceptions.rb:365:in `issues'
    	from /usr/local/Homebrew/Library/Homebrew/exceptions.rb:419:in `dump'
    	from /usr/local/Homebrew/Library/Homebrew/brew.rb:133:in `rescue in <main>'
    	from /usr/local/Homebrew/Library/Homebrew/brew.rb:26:in `<main>'
    
    high priority bug 
    opened by daniel-beard 35
  • Adds ability to include related frameworks when using Carthage

    Adds ability to include related frameworks when using Carthage

    Hey all,

    I'm opening this PR for issue #488 early to get the ball rolling and get some feedback on the solution.

    The way this is currently designed, and due to our dependency on the file system to evaluate related dependencies, has made it very difficult to test the logic around including related dependencies.

    At the moment I am not exactly sure how to get around it and am open to ideas.

    Other than that everything else is pretty straightforward and will hopefully make sense but if you have any questions feel free to ask away!

    Rog

    opened by rpassis 22
  • Homebrew installation fails

    Homebrew installation fails

    When trying to install with Homebrew, I get the following error

    ==> make install PREFIX=/usr/local/Cellar/xcodegen/1.8.0
    swift build --disable-sandbox -c release -Xswiftc -static-stdlib
    Compile CYaml src/writer.c
    Compile CYaml src/scanner.c
    Compile CYaml src/reader.c
    Compile CYaml src/emitter.c
    Compile CYaml src/parser.c
    Compile CYaml src/api.c
    Compile Swift Module 'PathKit' (1 sources)
    Compile Swift Module 'AEXML' (5 sources)
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/libxml2/module.modulemap:1:8: error: redefinition of module 'libxml2'
    module libxml2 [system] [extern_c] {
           ^
    /usr/include/libxml2/module.modulemap:1:8: note: previously defined here
    module libxml2 [system] [extern_c] {
           ^
    1 error generated.
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/libxml2/module.modulemap:1:8: error: redefinition of module 'libxml2'
    module libxml2 [system] [extern_c] {
           ^
    /usr/include/libxml2/module.modulemap:1:8: note: previously defined here
    module libxml2 [system] [extern_c] {
           ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/libxml2/module.modulemap:1:8: error: redefinition of module 'libxml2'
    module libxml2 [system] [extern_c] {
           ^
    /usr/include/libxml2/module.modulemap:1:8: note: previously defined here
    module libxml2 [system] [extern_c] {
           ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/libxml2/module.modulemap:1:8: error: redefinition of module 'libxml2'
    module libxml2 [system] [extern_c] {
           ^
    /usr/include/libxml2/module.modulemap:1:8: note: previously defined here
    module libxml2 [system] [extern_c] {
           ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/libxml2/module.modulemap:1:8: error: redefinition of module 'libxml2'
    module libxml2 [system] [extern_c] {
           ^
    /usr/include/libxml2/module.modulemap:1:8: note: previously defined here
    module libxml2 [system] [extern_c] {
           ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/libxml2/module.modulemap:1:8: error: redefinition of module 'libxml2'
    module libxml2 [system] [extern_c] {
           ^
    /usr/include/libxml2/module.modulemap:1:8: note: previously defined here
    module libxml2 [system] [extern_c] {
           ^
    error: terminated(1): /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-build-tool -f /private/tmp/xcodegen-20180403-12948-166yly2/XcodeGen-1.8.0/.build/release.yaml main output:
        
    
    Fetching https://github.com/kylef/PathKit.git
    Fetching https://github.com/onevcat/Rainbow.git
    Fetching https://github.com/kylef/Commander.git
    Fetching https://github.com/tadija/AEXML.git
    Fetching https://github.com/kylef/Spectre.git
    Fetching https://github.com/jpsim/Yams.git
    Fetching https://github.com/yonaskolb/JSONUtilities.git
    Fetching https://github.com/xcodeswift/xcproj.git
    Fetching https://github.com/JohnSundell/ShellOut.git
    Cloning https://github.com/kylef/PathKit.git
    Resolving https://github.com/kylef/PathKit.git at 0.9.1
    Cloning https://github.com/onevcat/Rainbow.git
    Resolving https://github.com/onevcat/Rainbow.git at 3.1.1
    Cloning https://github.com/kylef/Commander.git
    Resolving https://github.com/kylef/Commander.git at 0.8.0
    Cloning https://github.com/kylef/Spectre.git
    Resolving https://github.com/kylef/Spectre.git at 0.8.0
    Cloning https://github.com/jpsim/Yams.git
    Resolving https://github.com/jpsim/Yams.git at 0.6.0
    Cloning https://github.com/tadija/AEXML.git
    Resolving https://github.com/tadija/AEXML.git at 4.2.2
    Cloning https://github.com/yonaskolb/JSONUtilities.git
    Resolving https://github.com/yonaskolb/JSONUtilities.git at 3.3.8
    Cloning https://github.com/xcodeswift/xcproj.git
    Resolving https://github.com/xcodeswift/xcproj.git at 4.2.0
    Cloning https://github.com/JohnSundell/ShellOut.git
    Resolving https://github.com/JohnSundell/ShellOut.git at 2.1.0
    make: *** [build] Error 1
    
    ==> Formula
    Tap: yonaskolb/xcodegen
    Path: /usr/local/Homebrew/Library/Taps/yonaskolb/homebrew-xcodegen/Formula/xcodegen.rb
    ==> Configuration
    HOMEBREW_VERSION: 1.5.14
    ORIGIN: https://github.com/Homebrew/brew.git
    HEAD: 7fd6210127f088b6ee8708a1d7f4ec2df3fc5bb4
    Last commit: 32 hours ago
    Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
    Core tap HEAD: 603231ba2b0ec137ed5d74b3e3ce1a2419a62da5
    Core tap last commit: 2 hours ago
    HOMEBREW_PREFIX: /usr/local
    HOMEBREW_ENABLE_AUTO_UPDATE_MIGRATION: 1
    HOMEBREW_NO_ANALYTICS_THIS_RUN: 1
    CPU: octa-core 64-bit ivybridge
    Homebrew Ruby: 2.3.3 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/bin/ruby
    Clang: 9.1 build 902
    Git: 2.17.0 => /usr/local/bin/git
    Curl: 7.54.0 => /usr/bin/curl
    Java: 1.8.0_101
    macOS: 10.13.4-x86_64
    CLT: 9.3.0.0.1.1521514116
    Xcode: 9.3
    XQuartz: 2.7.11 => /opt/X11
    ==> ENV
    HOMEBREW_CC: clang
    HOMEBREW_CXX: clang++
    MAKEFLAGS: -j8
    CMAKE_PREFIX_PATH: /usr/local
    CMAKE_INCLUDE_PATH: /usr/include/libxml2:/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers
    CMAKE_LIBRARY_PATH: /System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
    PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/10.13
    ACLOCAL_PATH: /usr/local/share/aclocal
    PATH: /usr/local/Homebrew/Library/Homebrew/shims/super:/usr/bin:/bin:/usr/sbin:/sbin
    
    Error: yonaskolb/xcodegen/xcodegen 1.8.0 did not build
    Logs:
         /Users/tkrajacic/Library/Logs/Homebrew/xcodegen/01.make
         /Users/tkrajacic/Library/Logs/Homebrew/xcodegen/00.options.out
         /Users/tkrajacic/Library/Logs/Homebrew/xcodegen/01.make.cc
    If reporting this issue please do so to (not Homebrew/brew or Homebrew/core):
    yonaskolb/xcodegen
    
    /usr/local/Homebrew/Library/Homebrew/utils/github.rb:220:in `raise_api_error': curl failed!   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current (GitHub::Error)
                                     Dload  Upload   Total   Spent    Left  Speed
      0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
    curl: (22) The requested URL returned error: 422 Unprocessable Entity
    curl: (3) <url> malformed
    	from /usr/local/Homebrew/Library/Homebrew/utils/github.rb:178:in `open_api'
    	from /usr/local/Homebrew/Library/Homebrew/utils/github.rb:278:in `search'
    	from /usr/local/Homebrew/Library/Homebrew/utils/github.rb:225:in `search_issues'
    	from /usr/local/Homebrew/Library/Homebrew/utils/github.rb:238:in `issues_for_formula'
    	from /usr/local/Homebrew/Library/Homebrew/exceptions.rb:368:in `fetch_issues'
    	from /usr/local/Homebrew/Library/Homebrew/exceptions.rb:364:in `issues'
    	from /usr/local/Homebrew/Library/Homebrew/exceptions.rb:418:in `dump'
    	from /usr/local/Homebrew/Library/Homebrew/brew.rb:138:in `rescue in <main>'
    	from /usr/local/Homebrew/Library/Homebrew/brew.rb:30:in `<main>'
    
    bug 
    opened by tkrajacic 22
  • Recursive path issues

    Recursive path issues

    When I move to the parent directory and then try and use other folder outside of the current directory, everything is picked up fine, however all the folders are not included inside of the named directory or the last folder.

    I'm getting around this by using a symlink to pull the folders in correctly.

    Should also note this happens when using a full path as well.

    Using a symlink: screen shot 2018-03-01 at 3 21 21 pm

    Without symlink and using a parent path: ../otherfolder/sources screen shot 2018-03-01 at 3 22 27 pm

    bug 
    opened by iamtomcat 20
  • Skipped tests usage

    Skipped tests usage

    Hello. According to documentation: skippedTests: [String] - List of tests in the test target to skip. Defaults to empty For me it doesn't work

    scheme:
          testTargets:
            - name: ClientTests
              randomExecutionOrder: true
              skippedTests: 
                - ApiManagerApiCallTests
    

    also

    skippedTests: 
                - "ApiManagerApiCallTests"
    

    and

    skippedTests: [ApiManagerApiCallTests]

    randomExecutionOrder does work for the scheme, but skippedTests don't. Am I missing something?

    opened by yevgenPaykey 19
  • SwiftPM dependencies don't link their required dependencies

    SwiftPM dependencies don't link their required dependencies

    Adding transitivelyLinkDependencies: true to my options or target has no effect on the resulting xcode project.

    I am depending on SwiftPM packages using the package dependency type. For instance, I depend on grpc-swift, which depends on swift-nio, which itself builds CNIOAtomics. I can build grpc-swift with xcodegen (project.yml here), and in Xcode I see that it does build CNIOAtomics. Then from Carthage, I try to depend on that grpc-swift (the point of my using xcodegen being Carthage), and there, CNIOAtomics is missing. So cartage update works, but building the end project fails with "Missing required module 'CNIOAtomics'".

    Now, if I add swift-nio to the packages of my end project, then it works, suggesting an error with transitive dependencies. I thought that maybe that was because I should set transitivelyLinkDependencies: true, but this has no effect on the resulting project.pbxproj.

    Am I missing something? Is it wrong to use transitivelyLinkDependencies with SwiftPM packages?

    bug 
    opened by JonasVautherin 19
  • Support test target for local Swift Package

    Support test target for local Swift Package

    Close: https://github.com/yonaskolb/XcodeGen/issues/1050

    note: This PR needs to wait for releasing new version of tuist/XcodeProj with https://github.com/tuist/XcodeProj/pull/605

    opened by freddi-kit 18
  • How to add testTargets from local swift package to targets in Xcodegen?

    How to add testTargets from local swift package to targets in Xcodegen?

    I have a swift package named Lib having a testTarget name LibTests. And I also have iOS target name MyApp which wants to use LibTests as one of its testTargets scheme. If I were using Xcode UI to manipulate xcodeproj directly. I can go to MyApp's test scheme and add LibTests there. But I wonder how can I do the same with Xcodegen.

    I have my project.yml defined like this. It doesn't work. LibTests doesn't get included in MyApp test targets.

    packages:
      Lib:
        path: Lib
    
    targets:
      MyApp:
        type: application
        platform: iOS
        scheme:
          testTargets:
          - package: Lib
            product: LibTests
    

    Thanks in advance.

    opened by BeerPoldet 18
  • Independent Watch Apps Target Type - application.watchapp2-container

    Independent Watch Apps Target Type - application.watchapp2-container

    There's a new target type for independent Apple Watch apps defined as application.watchapp2-container. It seems to act pretty as the iOS app did and contains the application.watchapp2.

    If you try to use it now with xcodegen it defines it as: Parsing project spec failed: Unknown Target type: application.watchapp2-container

    opened by leogdion 18
  • Transitively embed dependencies

    Transitively embed dependencies

    If a target embeds dependencies (i.e. App and Test bundles) and a dependency has dependencies that can be embedded, then we should embed those dependencies as long as they weren't embedded along the way.

    This already happens for Carthage dependencies, the change makes it happen for non-Carthage frameworks as well.

    Also, closes #219, since it correctly picks up on the transitive dependency and embeds it properly.

    opened by brentleyjones 18
  • Fix localisation variant groups

    Fix localisation variant groups

    Add localized resources are added to one variant group. described in #69

    1. Create variant groups of the base localization
    2. Add references to localized resources into base localization variant groups
    opened by ryohey 18
  • Group targets into subdirectories of the Xcode project

    Group targets into subdirectories of the Xcode project

    Hi - reading through the project spec, I don't see a way to group project level targets. I'd like to achieve the following:

    Project -> Apps ---- App1 ---- App2 -> App Extensions ---- AppExtension1 ---- AppExtension2

    Is there any way to accomplish this with XcodeGen?

    opened by cal-os 0
  • Add option to check if project would change

    Add option to check if project would change

    As there is the cache functionality already, it might be a good idea to add a functionality that can be used to check if the project definition has been changed since the project was generated the last time. This could be used to show a warning in Xcode if building a project that needs recreating because the yml was changed.

    opened by Lutzifer 0
  • `make install` failing: unable to copy `SettingPresets`

    `make install` failing: unable to copy `SettingPresets`

    Steps to reproduce

    • Run sudo make install on macOS 12.5.1 (with zsh). This is the output:

    Output

    100%: Build succeeded
    mkdir -p /usr/local/bin
    cp -f /Users/[...]/XcodeGen/.build/apple/Products/Release/xcodegen /usr/local/bin/xcodegen
    mkdir -p /usr/local/share/xcodegen
    cp -R /SettingPresets /usr/local/share/xcodegen/SettingPresets
    cp: /SettingPresets: No such file or directory
    make: *** [install] Error 1
    

    It seems that, for some reason, $(CURRENT_PATH) is becoming empty. Changing CURRENT_PATH = $(PWD) to

    CURRENT_PATH = `pwd`
    

    seems to solve the issue.

    opened by fabio914 0
  • Handle imports with same relative path

    Handle imports with same relative path

    • #1261

    Changes

    • Identify merged includes using the full path to the file rather than just filePath which can be relative to the basePath and not unique.
    • Added comments to the path properties to make it clearer what they contain.
    • Other minor cleanup (renaming a parameter and making things private).
    opened by CraigSiemens 1
  • Including yml files with the same `filePath` causes the second to be ignored.

    Including yml files with the same `filePath` causes the second to be ignored.

    Given the following project setup, OutgoingTransferDetail.yml will not be loaded causing targets that depend on it to fail.

    Steps to Reproduce

    .
    ├── project.yml
    └── Modules
        ├── Modules.yml
        ├── Foo
        │   └── main.swift
        ├── Incoming
        │   ├── Incoming.yml
        │   └── Transfer
        │       ├── Transfer.yml
        │       └── IncomingTransferDetail
        │           ├── IncomingTransferDetail.yml
        │           └── Sources
        │               └── main.swift
        └── Outgoing
            ├── Outgoing.yml
            └── Transfer
                ├── Transfer.yml
                └── OutgoingTransferDetail
                    ├── OutgoingTransferDetail.yml
                    └── Sources
                        └── main.swift
    

    Each folder that has a .yml file only contains includes for its subdirectories.

    For example Module.yml is just

    include:
    - Incoming/Incoming.yml
    - Outgoing/Outgoing.yml
    

    Foo, IncomingTransferDetail, and OutgoingTransferDetail are targets. Foo depends on the other two.

    Expected Result

    The project should load with a Foo target that depends on the IncomingTransferDetail and OutgoingTransferDetail targets.

    Actual Result

    Spec validation error: Target "Foo" has invalid dependency: "OutgoingTransferDetail"
    Program ended with exit code: 1
    

    Additional Details

    It seems to be ab issue with how SpecFile tracks mergedTargets. It only uses the file name which fails because Modules/Incoming/Transfer/Transfer.yml and Modules/Outgoing/Transfer/Transfer.yml both get a filePath of Transfer/Transfer.yml when using relative paths.

    I'me working on a PR for this but just wanted to capture the details for the issue here.

    opened by CraigSiemens 0
Releases(2.32.0)
  • 2.32.0(Aug 18, 2022)

    Added

    • Add support for mlmodelc files #1236 @antonsergeev88
    • Add enable option for include #1242 @freddi-kit

    Fixed

    • Fix checking environment variable in include #1242 @freddi-kit
    • Fix profile action for frameworks in Xcode 14 #1245 @SSheldon
    Source code(tar.gz)
    Source code(zip)
    xcodegen.zip(5.09 MB)
  • 2.31.0(Jul 24, 2022)

  • 2.30.0(Jul 16, 2022)

    Added

    • Added support for new target type extensionkit-extension in Xcode 14 #1228 @aleksproger

    Changed

    • Speed up generating build settings for large projects #1221 @jpsim

    Fixed

    • Fix XcodeGen building as library after breaking XcodeProj update 8.8.0 #1228 @aleksproger
    Source code(tar.gz)
    Source code(zip)
    xcodegen.zip(5.08 MB)
  • 2.29.0(May 10, 2022)

    Some support for Xcode Test Plans has been added. For now test plans are not generated by XcodeGen and must be created in Xcode and checked in, and then referenced by path. If the test targets are added, removed or renamed, the test plans may need to be updated in Xcode

    Added

    • Schemes and Target Schemes can now reference existing Test Plans under {scheme}.test.testPlans and {target}.scheme.testPlans, respectively. #716 @yonaskolb @omares

    Fixed

    • Fixed an issue where DocC was not added to source file list #1202 @hiragram

    Changed

    • Updated XcodeProj to 8.7.1 #1213 @yonaskolb
    Source code(tar.gz)
    Source code(zip)
    xcodegen.zip(5.08 MB)
  • 2.28.0(Mar 31, 2022)

  • 2.27.0(Mar 20, 2022)

    Added

    • Support test target for local Swift Package #1074 @freddi-kit
    • Added coverageTargets for target test schemes. This enables to gather code coverage for specific targets. #1189 @gabriellanata
    • Fixed issue where .gyb files could not be added to source file list [#1191]((https://github.com/yonaskolb/XcodeGen/issues/1191) @hakkurishian

    Fixed

    • Fixed crash caused by a simultaneous write during a glob processing #1177 @tr1ckyf0x
    • Skip generating empty compile sources build phases for watch apps #1185 @evandcoleman

    Commits

    Source code(tar.gz)
    Source code(zip)
    xcodegen.zip(5.06 MB)
  • 2.26.0(Feb 6, 2022)

  • 2.25.0(Sep 23, 2021)

  • 2.24.0(Jun 27, 2021)

    Added

    • Added support for DocC Catalogs #1091 @brevansio
    • Added support for "driver-extension" and "system-extension" product types #1092 @vgorloff
    • Add support for conditionally linking dependencies for specific platforms #1087 @daltonclaybrook
    • Add ability to specify UI testing screenshot behavior in test schemes #942 @daltonclaybrook

    Changed

    • Breaking: Rename the platform field on Dependency to platformFilter #1087 @daltonclaybrook

    Commits

    Source code(tar.gz)
    Source code(zip)
    xcodegen.zip(4.96 MB)
  • 2.23.1(May 23, 2021)

  • 2.23.0(May 19, 2021)

  • 2.22.0(May 6, 2021)

    Added

    • Support runPostActionsOnFailure for running build post scripts on failing build #1075 @freddi-kit

    Changed

    • Xcode no longer alerts to project changes after regeneration, due to internal workspace not regenerating if identical #1072 @yonaskolb

    Fixed

    • Fixed no such module DOT error when package is used as a dependency #1067 @yanamura
    • Fixed scheme config variant lookups for some configs like ProdDebug and Prod-Debug that broke in 2.21.0 #1070 @yonaskolb

    Commits

    Source code(tar.gz)
    Source code(zip)
    xcodegen.zip(4.93 MB)
  • 2.21.0(May 1, 2021)

    Added

    • Support weak link for Swift Package Dependencies #1064 @freddi-kit

    Changed

    • Carthage frameworks are no longer embedded for "order-only" target dependencies. This avoid redundant embeds in situations where a target's sources import a Carthage framework but do not have a binary dependency on it (like a test target which runs in a host app). #1041 @elliottwilliams

    Fixed

    • The Core target is renamed to avoid collisions with other packages. #1057 @elliottwilliams
    • Lookup scheme config variants by whole words, fixing incorrect assignment in names that contain subtrings of each other (eg PreProd and Prod) #976 @stefanomondino

    Commits

    Source code(tar.gz)
    Source code(zip)
    xcodegen.zip(4.92 MB)
  • 2.20.0(Apr 8, 2021)

    Added

    • Allow specifying a github name like JohnSundell/Ink instead of a full url for Swift Packages #1029 @yonaskolb
    • Added explicity LastUpgradeCheck and LastUpgradeVersion override support so it's possible to override these properties without using the project.xcodeVersion. 1013 @Andre113
    • Added macroExpansion for run in schemes #1036 @freddi-kit
    • Added askForAppToLaunch for profile in schemes #1035 @freddi-kit
    • Added support for selectedTests in schemes Test configuration. #913 @ooodin

    Fixed

    • Fixed regression on .storekit configuration files' default build phase. #1026 @jcolicchio
    • Fixed framework search paths when using .xcframeworks. #1015 @FranzBusch
    • Fixed bug where schemes without a build target would crash instead of displaying an error #1040 @dalemyers
    • Fixed files with names ending in Info.plist (such as GoogleServices-Info.plist) from being omitted from the Copy Resources build phase. Now, only the resolved info plist file for each specific target is omitted. #1027 @liamnichols

    Internal

    • Build universal binaries for release. XcodeGen now runs natively on Apple Silicon. #1024 @thii

    Commits

    Source code(tar.gz)
    Source code(zip)
    xcodegen.zip(4.92 MB)
  • 2.19.0(Feb 22, 2021)

    Added

    • Added support for building and running on Linux platforms. Tested for compatibility with Swift 5.3+ and Ubuntu 18.04. #988 @elliottwilliams
    • Added useBaseInternationalization to Project Spec Options to opt out of Base Internationalization. #961 @liamnichols
    • Added storeKitConfiguration to allow specifying StoreKit Configuration in Scheme and TargetScheme, supporting either xcodeproj or xcworkspace via schemePathPrefix option. #964 @jcolicchio
    • Added more detailed error message with method arguments. #990 @bannzai
    • Added basedOnDependencyAnalysis to Project Spec Build Script to be able to choose not to skip the script. #992 @myihsan
    • Added BuildRule.runOncePerArchitecture to allow running build rules once per architecture. #950 @sascha
    • Added discovered dependency file for a build script #1012 @polac24 @fggeraissate

    Changed

    • Breaking: Info.plists with custom prefixes are no longer added to the Copy Bundle Resources build phase #945 @anivaros
    • Breaking: workingDirectory of included legacy targets is now made relative to including project #981 @jcolicchio
    • Breaking: Make simulateLocation respect schemePathPrefix option. #973 @jcolicchio

    Fixed

    • Fixed error message output for minimumXcodeGenVersion. #967 @joshwalker
    • Remove force-unwrapping causing crash for LegacyTargets #982 @jcolicchio
    • Fixed a race condition in an internal JSON decoder, which would occasionally fail with an error like Parsing project spec failed: Error Domain=Unspecified error Code=0. #995 @elliottwilliams
    • Fixed issue where frameworks with MACH_O_TYPE: staticlib were being incorrectly embedded. #1003 @mrabiciu

    Internal

    • Updated to Yams 4.0.0 #984 @swiftty

    Commits

    Source code(tar.gz)
    Source code(zip)
    xcodegen.zip(2.39 MB)
  • 2.18.0(Oct 2, 2020)

    Added

    • Add Scheme.Test.TestTarget.skipped to allow skipping of an entire test target. #916 @codeman9
    • Added ability to set custom LLDBInit scripts for launch and test schemes #929 @polac24
    • Adds App Clip support. #909 @brentleyjones @dflems
    • Application extension schemes now default to launchAutomaticallySubstyle = 2 and the correct debugger and launcher identifiers #932 @brentleyjones
    • Updated SettingsPresets to use new defaults from Xcode 12. #953 @liamnichols
    • Enable Base Internationalization by default as per Xcode 12 behavior. #954 @liamnichols

    Changed

    • Change default project version to Xcode 12 #960 @yonaskolb

    Internal

    • Updates CI to run on Xcode 12. #936 #960 @dflems @yonaskolb

    Fixed

    • Select the first runnable build target, if present. #957 @codeman9
    • Allow SDK dependencies to be embedded. #922 @k-thorat
    • Allow creating intermediary groups outside of the project directory. #892 @segiddins
    • Fix appex's Runpath Search Paths under macOS target. #952 @rinsuki
    • onlyCopyFilesOnInstall is extended for the Embed App Extensions build phase. #948 @RomanPodymov

    Commits

    Source code(tar.gz)
    Source code(zip)
    xcodegen.zip(2.45 MB)
  • 2.17.0(Aug 4, 2020)

    Added

    • Added options.fileTypes which lets you set cross project defaults for certain file extensions #914 @yonaskolb
    • Added onlyCopyFilesOnInstall option to targets for the Embed Files build phase. #912 @jsorge

    Fixed

    • Treat all directories with known UTI as file wrapper. #896 @KhaosT
    • Generated schemes for application extensions now contain wasCreatedForAppExtension = YES. #898 @muizidn
    • Allow package dependencies to use link: false #920 @k-thorat

    Internal

    • Updated to XcodeProj 7.13.0 #908 @brentleyjones

    Commits

    Source code(tar.gz)
    Source code(zip)
    xcodegen.zip(2.61 MB)
  • 2.16.0(Jun 17, 2020)

    Added

    • Improve speed of metadata parsing and dependency resolution. #803 @michaeleisel
    • Improve support for iOS sticker packs and add support for launchAutomaticallySubstyle to run schemes. #824 @scelis
    • Add --project-root option to generate command. #828 @ileitch
    • Add an ability to set an order of groups with options.groupOrdering #613 @Beniamiiin
    • Add the ability to output a dependency graph in graphviz format #852 @jeffctown
    • Adds uncluttering the project manifest dumped to YAML from empty values #858 @paciej00
    • Added ability to name the executable target when declaring schemes. #869 @elland
    • Added ability to set executable to Ask to Launch. #871 @pinda

    Fixed

    • Fixed issue when linking and embeding static frameworks: they should be linked and NOT embed. #820 @acecilia
    • Fixed issue when generating projects for paths with a dot in the folder for swift sources. #826 @asifmohd
    • Prefix static library target filenames with 'lib' to match Xcode. #831, #842 @ileitch
    • Fixed duplicate addition of carthage static frameworks. #829 @funzin
    • Fix handling of SWIFT_INSTALL_OBJC_HEADER when its value is YES/NO. #827 @ileitch
    • Set preActions and postActions on the build action of a TargetScheme instead of the other actions. #823 @brentleyjones
    • Prevent test targets from being set as a scheme's launch action #835 @brentleyjones
    • Implicitly include bundles in the Copy Bundle Resources build phase. #838 @skirchmeier
    • Fixed dumping a project manifest which contains an array of project references #840 @paciej00
    • Generate correct PBXTargetDependency for external targets. #843 @ileitch
    • Fix linking of multiple products from the same Swift Package #830 @toshi0383
    • Don't deduplicate files in include with different path but same name. #849 @akkyie
    • Don't link transitive static carthage libraries. #853 @akkyie
    • Optimize simplifying paths for faster project generation. #857 @akkyie
    • Fixed issue where wrapper folders may not include correctly in the generated project. #862 @KhaosT
    • Compile xcmappingmodel files instead of copying bundle resources. #834 @jcolicchio
    • Fixed issue where Complie Sources build phase is generated for resource bundles even when they have no files to compile #878 @nkukushkin

    Commits

    Source code(tar.gz)
    Source code(zip)
    xcodegen.zip(2.59 MB)
  • 2.15.1(Apr 2, 2020)

  • 2.15.0(Mar 25, 2020)

    Added

    • Add support for local Swift Packages in packages using path. #808 @freddi-kit
    • Add buildImplicitDependencies as an option on TargetScheme. #810 @evandcoleman

    Fixed

    • Fixed resolving path to local Swift Packages #796 @freddi-kit
    • Added ability to stop on every main thread checker issue on Run schemes and TargetSchemes #799 @ionutivan
    • Avoid copying ObjC interface header when SWIFT_INSTALL_OBJC_HEADER=false. #805 @kateinoigakukun

    Commits

    Source code(tar.gz)
    Source code(zip)
    xcodegen.zip(1.97 MB)
  • 2.14.0(Feb 29, 2020)

    Added

    • Added ability to embed and code sign Swift package dependencies with dynamic products. #788 @alexruperez

    Fixed

    • Revert "Add Base to known regions even if one doesn't exist" #791 @bryansum
    • Set defaultConfigurationName for every target which is defined in a project. #787 @ken0nek
    • Set TEST_TARGET_NAME only when a project has UITest bundle. #792 @ken0nek
    • Set xcodeproj path in project.xcworkspace/contents.xcworkspacedata #793 @ken0nek

    Commits

    Source code(tar.gz)
    Source code(zip)
    xcodegen.zip(1.97 MB)
  • 2.13.1(Feb 7, 2020)

    Fixed

    • Validate scheme test action and test coverage target references before generating. #775 @liamnichols
    • Fixed parsing prerelease identifiers in Swift Package versions #779 @yonaskolb
    • Fixed using legacy targets as dependencies #778 @yonaskolb

    Internal

    • Updated to XcodeProj 7.8.0 #777 @yonaskolb
    • Use https://github.com/mxcl/Version #779 @yonaskolb

    Commits

    Source code(tar.gz)
    Source code(zip)
    xcodegen.zip(1.97 MB)
  • 2.13.0(Feb 1, 2020)

    Added

    • Support External Target References via subprojects. #701 @evandcoleman

    Fixed

    • Fixed compilation as library by locking down XcodeProj version #767 @yonaskolb
    • Stabilized sorting of groups with duplicate names/paths. #671 @ChristopherRogers
    • Moved Copy Bundle Resources to after Link with Libraries build phase #768 @yonaskolb

    Internal

    • Updated to XcodeProj 7.7.0 #767 @yonaskolb

    Commits

    Source code(tar.gz)
    Source code(zip)
    xcodegen.zip(1.93 MB)
  • 2.12.0(Feb 1, 2020)

    Added

    • Added pre and post command options. Useful for running pod install in combination with --use-cache #759 @yonaskolb
    • Support for language and region settings on a target basis #728 @FranzBusch
    • Added option to generate only Info.plist files with --only-plists #739 @namolnad
    • Added the option to specify a simulateLocation in a scheme #722 @basvankuijck
    • Support for On Demand Resources tags #753 @sipao

    Fixed

    • Fixed resolving a relative path for projectReference.path #740 @kateinoigakukun
    • Don't add framework dependency's directory to FRAMEWORK_SEARCH_PATHS if it is implicit #744 @ikesyo @yutailang0119
    • Fixed resolving relative path passed to XcodeProj #751 @PycKamil
    • Prefer configurations named "Debug" or "Release" for default scheme build configurations #752 @john-flanagan
    • Added an extra check for package versions. #755 @basvankuijck

    Internal

    • Update to SwiftCLI 6.0 and use the new property wrappers #749 @yonaskolb

    Commits

    Source code(tar.gz)
    Source code(zip)
    xcodegen.zip(1.93 MB)
  • 2.11.0(Dec 3, 2019)

    Added

    • Add Carthage static framework dependencies support. #688 @giginet
    • Added xcodegen dump command #710 @yonaskolb
    • Added --no-env option to disable environment variables expansion #704 @rcari
    • Added custom group support for target sources #621 @sroebert @rcari

    Fixed

    • Improved variable expansion runtime #704 @rcari
    • Fixed missing headers for static framework targets #705 @wag-miles
    • Using more file types from XcodeProj for PBXFileReferences resulting in less project diffs #715 @yonaskolb
    • Fixed localized *.intentdefinition not being added to build source phases #720 @giginet
    • Fixed selectedLauncherIdentifier not being set Xcode.IDEFoundation.Launcher.PosixSpawn when debugEnabled: false is defined in test action #725 @ken0nek
    • Fixed unnecessary dependencies related to SwiftPM #726 @tid-kijyun

    Changed

    • Deprecated $old_form variables in favor of ${new_form} variables #704 @rcari
    • Updated XcodeProj to 7.4.0 #709 #715 @yonaskolb
    • Updated to Swift 5.1 #714 @yonaskolb

    Commits

    Source code(tar.gz)
    Source code(zip)
    xcodegen.zip(1.89 MB)
  • 2.10.1(Oct 31, 2019)

  • 2.10.0(Oct 27, 2019)

    Added

    • Support Target Reference to another project. #655 @kateinoigakukun
    • Added coverageTargets for test target. This enables to gather code coverage for specific targets. #656 @kateinoigakukun

    Fixed

    • Add base localisation by default even if no base localised files were found. Fixes warning in Xcode 11 #685 @yonaskolb
    • Don't generate CFBundleExecutable in default generated Info.plist for bundle target types #689 @FranzBusch
    • Fixed resolving relative paths with custom project destination #681 @giginet
    • Fixed resolving relative paths for Info.plist #683
    • Fixed macOS unit test target TEST_HOST #696 @mjarvis

    Internal

    • Restructure targets #698 @yonaskolb

    Commits

    Source code(tar.gz)
    Source code(zip)
    xcodegen.zip(1.87 MB)
  • 2.9.0(Oct 14, 2019)

    Added

    • Added Scheme Templates #672 @bclymer

    Fixed

    • Fixed macOS unit test setting preset #665 @yonaskolb
    • Add rcproject files to sources build phase instead of resources #669 @Qusic
    • Prefer default configuration names for generated schemes #673 @giginet
    • Fixed some resource files being placed to "Recovered References" group #679 @nivanchikov

    Internal

    • Updated to SwiftCLI 5.3.2 #667 @giginet
    • Fixed tests in case-sensitive file system #670 @Qusic

    Commits

    Source code(tar.gz)
    Source code(zip)
    xcodegen.zip(1.84 MB)
  • 2.8.0(Sep 28, 2019)

    Added

    • Added support for Swift Package dependencies #624 @yonaskolb
    • Added includes to sources for a Target. This follows the same glob-style as excludes but functions as a way to only include files that match a specified pattern. Useful if you only want a certain file type, for example specifying **/*.swift. #637 @bclymer
    • Support dylib SDK. #650 @kateinoigakukun
    • Added language and region options for run and test scheme #654 @kateinoigakukun
    • Added debugEnabled option for run and test scheme #657 @kateinoigakukun

    Fixed

    • Expand template variable in Array of Any #651 @kateinoigakukun
    • Significantly improve performance when running with a large number files. #658 @kateinoigakukun
    • Removed some more diffs between the generated .pbxproj and when Xcode resaves it #663 @yonaskolb

    Internal

    • Removed needless Array initialization. #661 @RomanPodymov
    • Updated to XcodeProj 7.1.0 #624 @yonaskolb

    Commits

    Source code(tar.gz)
    Source code(zip)
    xcodegen.zip(1.84 MB)
  • 2.7.0(Sep 1, 2019)

    Added

    • Added Bash 4 style recursive globbing (**/*) in target sources excludes #636 @bclymer
    • Added ability to disable main thread checker in Schemes #601 @wag-miles

    Fixed

    • Fixed included specs that were referenced multiple times from duplicating content #599 @haritowa
    • Fixed .orig files being added to the project #627 @keith

    Changed

    • Allow linking of dependencies into static libraries when link is set to true #635 @kateinoigakukun

    Commits

    Source code(tar.gz)
    Source code(zip)
    xcodegen.zip(1.82 MB)
Owner
Yonas Kolb
iOS and Swift dev
Yonas Kolb
A command line tool for managing Swift Playground projects on your Mac.

swift-playground-tools A command line tool for managing Swift Playground projects on your Mac. Generate Xcode Project $ playground-tools generate-xcod

Liam Nichols 0 Dec 31, 2021
LinkedLog is a Xcode plugin that includes a Xcode PCH header file template that adds the macros `LLog` and `LLogF` and parses their output to link from the console to the corresponding file and line.

LinkedLog Xcode Plugin LinkedLog is a Xcode plugin that includes a Xcode PCH file template that adds the macros LLog and LLogF. The LLog macro will wo

Julian F. Weinert 23 Feb 23, 2021
Beak 🐦 Peck into your Swift files from the command line

Beak ?? Peck into your Swift files from the command line Beak can take a standard Swift file and then list and run any public global functions in it v

Yonas Kolb 563 Sep 9, 2022
Easily generate cross platform Swift framework projects from the command line

SwiftPlate Easily generate cross platform Swift framework projects from the command line. SwiftPlate will generate Xcode projects for you in seconds,

John Sundell 1.8k Sep 14, 2022
XCode Preview template for UIkit based project.

SwiftPreview XCode Preview template for UIkit based project. Support custom file template class inherit from UIView and UIViewController. How to use?

Won Heo 10 Mar 31, 2022
FocusSpace - A time-management tool to help you stay focus with your friends

FocusSpace ?? ElleHacks2022 - (Telus) First Place ?? Developers Manyi Cheng(@man

Manyi Cheng 1 Feb 13, 2022
ExpoMod - a small application tool that lets you quickly setting up your computer for presentations / exhibitions

ExpoMod is a small application tool that lets you quickly setting up your computer for presentations / exhibitions. Or simply having useful shortcut to not being distract and keep awake your computer.

Niemes 10 Jun 29, 2022
📝 Read, update and write your Xcode projects

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

Tuist 1.7k Sep 20, 2022
A patch collection to save your Xcode

Patch Xcode is worst IDE I have ever used Xcode 13.3 introduced a very annoying bug. When you type anything with Chinese IME in the LLDB console

Cyandev 98 Jul 14, 2022
The awesome Fastlane tools brought into your Xcode

Fastlane-Plugin for Xcode Features Run fastlane command with one click. Add your Fastfile in xcode. Setup Fastlane. Install Install via Alcatraz OR Cl

Rishabh Tayal 38 Jun 6, 2021
A starter project for Sample Project in Objective C.

A starter project for Sample Project in Objective C.

Zeeshan Haider 31 Jul 31, 2021
Put a big red line through w3schools.com links in duckduckgo search results

please-no-w3schools Put a big red line through w3schools.com links in duckduckgo search results. This browser extension only adds no-w3schools.css to

Rob Anderson 2 Jul 20, 2022
Swift sample app for running privileged operations on macOS using a helper tool

SwiftAuthorizationSample demonstrates how to run privileged operations on macOS using a helper tool managed by launchd. This sample was created with t

null 24 Sep 1, 2022
The Xcode playground labs from the Develop in Swift Fundamentals and Data Collections books.

Develop in Swift Labs A repository with the student materials from the Xcode 12 version of Develop with Swift Fundamentals This repo contains the Swif

Teaching Develop in Swift 7 Jul 6, 2022
IBSKit - an Xcode Fat Framework written in Swift 5

IBSKit framework is designed to solve everyday tasks that any iOS developer faces when developing a new project.

IBS Mobile iOS 8 Jun 14, 2022
XCSnippetsApp - macOS application to explore code snippets from the Swift and iOS community, view and edit the snippets before adding them conveniently to Xcode

XCSnippetsApp macOS application to explore code snippets from the Swift and iOS community, view and edit the snippets before adding them conveniently

Marco Eidinger 110 Sep 14, 2022
Turbo-iOS base project that's entirely driven from your backend Rails app.

Turbo-iOS base project that's entirely driven from your backend Rails app.

Dale Zak 105 Sep 11, 2022
A little beautifier tool for xcodebuild

xcbeautify xcbeautify is a little beautifier tool for xcodebuild. Similar to xcpretty, but faster. Features 2x faster than xcpretty. Human-friendly an

Thi Doãn 603 Sep 14, 2022
Open-source jailbreaking tool for many iOS devices

Open-source jailbreaking tool for many iOS devices *Read disclaimer before using this software. checkm8 permanent unpatchable bootrom exploit for hund

null 0 Nov 6, 2021