SwiftGen is a tool to automatically generates Swift code for resources of your projects (like images, localized strings, etc), to make them type-safe to use. Also, it's fully customizable thanks to Stencil templates, so even if it comes with predefined templates, you can make your own to generate whatever code fits your needs and your guidelines! SwiftGen is provided as a single command-line tool that uses a configuration file to define the various parsers to run (depending on the type of input files you need to parse) and their parameters. To create a sample configuration file as a starting point to adapt to your needs, run swiftgen config init. To use SwiftGen, simply create a swiftgen.yml YAML file (either manually or using swiftgen config init) then edit it to adapt to your project. The config file should list all the parsers to invoke, and for each parser, the list of inputs/outputs/templates/parameters to use for it.

Features

  • Avoid any risk of typo when using a String
  • Free auto-completion
  • Avoid the risk of using a non-existing asset name
  • All this will be ensured by the compiler and thus avoid the risk of crashing at runtime
  • SwiftGen is based on templates
  • SwiftGen comes bundled with some templates for each of the parsers

Project Samples

Project Activity

See All Activity >

Categories

Code Generators

License

MIT License

Follow SwiftGen

SwiftGen Web Site

You Might Also Like
Gen AI apps are built with MongoDB Atlas Icon
Gen AI apps are built with MongoDB Atlas

The database for AI-powered applications.

MongoDB Atlas is the developer-friendly database used to build, scale, and run gen AI and LLM-powered apps—without needing a separate vector database. Atlas offers built-in vector search, global availability across 115+ regions, and flexible document modeling. Start building AI apps faster, all in one place.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of SwiftGen!

Additional Project Details

Operating Systems

Apple iPhone

Programming Language

Swift

Related Categories

Swift Code Generators

Registered

2023-05-25