Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xcodegen-init

A standalone CLI tool to interactively create a boilerplate project.yml for XcodeGen.

Features

  • Interactive prompts — only essential questions, smart defaults for the rest
  • iOS and macOS project templates
  • Stencil-based templates, easy to customize
  • Auto-detects Xcode version from xcodebuild
  • Auto-fills DEVELOPMENT_TEAM from environment variable
  • Generates project.yml with app target + unit test target

Installation

mint install ryh/xcodegen-init@v1.0.0-rc1

Using SPM directly experimental-install

This is an experimental feature of SPM and might not work as expected. To install png2icns via SPM, follow these steps:

  • clone the repository (e.g. git clone https://github.com/ryh/xcodegen-init)
  • change into the directory: cd xcodegen-init
  • run swift package experimental-install (make sure your $PATH includes $HOME/.swiftpm/bin)

OR

Build from source

cd xcodegen-init
swift build -c release
cp .build/release/xcodegen-init /usr/local/bin/

Usage

Just run the command and answer the prompts:

xcodegen-init
🛠  XcodeGen Project Initializer
================================

Which platform? [ios/macos]
> ios
Project name:
> MyApp
Bundle ID prefix (e.g. com.mycompany):
> com.example
Deployment target [default: 16.0]:
> 15.0
Development team (optional, press enter to skip):
>

✅ Created project.yml at project.yml

Then generate the Xcode project:

xcodegen generate

Options

Option Description
-o, --output <path> Output path for project.yml. Defaults to project.yml
-f, --force Overwrite existing project.yml
--help Show help information
--version Show version

Environment Variables

Variable Description
DEVELOPMENT_TEAM Pre-fill the development team ID. Press enter to accept, or type to override
DEVELOPMENT_TEAM=ABC123XYZ xcodegen-init

Interactive Prompts

Prompt Required Default
Platform (ios/macos) Yes
Project name Yes
Bundle ID prefix Yes
Deployment target No iOS: 16.0, macOS: 13.0
Development team No From $DEVELOPMENT_TEAM env, or skip

The following fields use sensible defaults and are not prompted:

Field Default
Swift version 5.0
Marketing version 1.0.0
Current project version 1
Development language en
Xcode version Auto-detected from xcodebuild -version, fallback 16.0

Generated Output

The tool generates a project.yml that includes:

  • App target with platform-specific settings
  • Unit test target with dependency on the app
  • Info.plist with appropriate properties
  • Code signing configuration (Debug/Release)
  • DEVELOPMENT_TEAM (if provided)

Dependencies

License

Same as XcodeGen.

About

xcodegen sub command `init` create a boilerplate project.yml for XcodeGen

Topics

Resources

Stars

Watchers

Forks

Releases

Used by

Contributors

Languages