swiftgen
« Back to VersTracker
Description:
Swift code generator for assets, storyboards, Localizable.strings, etc.
Type: Formula  |  Tracked Since: Dec 28, 2025
Links: Homepage  |  @SwiftGen  |  formulae.brew.sh
Category: Developer tools
Tags: swift code-generation ios xcode assets localization
Install: brew install swiftgen
About:
SwiftGen is a command-line tool that generates Swift code for your assets, ensuring type safety and autocompletion for resources like images, colors, fonts, and storyboards. By parsing your asset catalogs and localization files, it eliminates string-based APIs, reducing runtime errors and improving code maintainability. This tool integrates seamlessly into Xcode build phases to keep generated code in sync with your project resources.
Key Features:
  • Generates type-safe Swift code for assets, colors, and fonts
  • Parses storyboards, nibs, and Localizable.strings files
  • Configurable via a simple YAML file
  • Integrates with Xcode build phases for automation
  • Supports custom templates for code generation
Use Cases:
  • Accessing images and colors in iOS apps without magic strings
  • Generating safe references to localized strings
  • Managing storyboard segue identifiers and reuse IDs
Alternatives:
  • R.swift – Similar functionality but Xcode-only; SwiftGen is more flexible with templates and CLI usage
  • SwiftGenKit – Library component used by SwiftGen; not a standalone alternative for end users
Version History
Detected Version Rev Change Commit