- As Swift 3 is officially no longer maintained, we're obsoleting the Swift 3 templates and they are no longer included with SwiftGen. You can still use the old swift 3 templates by getting them from older SwiftGen versions, or from GitHub by browsing older tags.
- XCAssets: the
imageAliasNametemplate parameters are now deprecated and will be removed in the next major release.
- The use of
swiftgen xcassets, …) command line for running individual parsers is now deprecated in favor of
swiftgen run <parser>. See "New Features" below.
- The subcommand
swiftgen templateshas been renamed
swiftgen template(singular); the plural form of the command has been deprecated and will be removed in next major version.
- The ability for SwiftGen to search custom named templates in
~/Library/Application Supporthas been deprecated and will be removed in SwiftGen 7.0. This little known feature made SwiftGen dependent on the machine it was running on. Use
templatePathto reference custom templates by path instead.
- Invoking individual parsers from the command line is now done via
swiftgen run <parser>. We still highly recommend to use a configuration file for flexibility and performance reasons in your projects, and only use
swiftgen run <parser>for things like quick iterations when writing your own custom templates.
- You can now easily create a new config file using
swiftgen config init. This will create an example and commented config file and open it to let you edit it to your needs. Note that the generated config file is static content which doesn't take the user's project into account (though that might change in the future).
- You can now use
swiftgen template doc [parser] [templateName]on the command line to quickly open the documentation for templates on GitHub directly from your terminal.
- Each parser now accepts an
optionsdictionary, with which you can set internal parser settings to change its behaviour. See the parser's specific documentation for available options.
- Strings: the parser now accepts a
separatoroption, used to split keys into structured components. The default separator remains
.. For more information, check the parser's documentation.
- Core Data: the built-in templates now support an optional
extraImportsparameter. With this you can provide a list of modules to additionally import, for when you have properties with types from external modules. For more information, check the template's documentation.
- Core Data: the built-in templates now support
RawRepresentableattributes (such as
OptionSet, …). They'll check the "User Info" of an attribute for a
RawTypekey, which should be set to the type name you want to use for that attribute. To avoid optional attributes, you can also add the
unwrapOptionaluser info key. For more information, check the template's documentation.
- Strings: the built-in templates now accept a parameter
lookupFunctionfor customizing the localization function, check the template documentation for more information.
- Strings: templates to generate Objective-C. Please check the template's documentation for more information.
- XCAssets: the parser now supports AR Resource Groups, together with reference images and objects.
- Templates: Bundle now use static property on BundleToken for better performance.
- All parsers now have built-in Swift 5 templates.
- Most templates now accept a parameter to force having the file name used as namespace (
enum <FileName>) in generated code even if there's only one single input file.
- SwiftGen now properly shows a better help message and the command usage when running an incomplete command, instead of complaining about a config file.
- XCAssets: improved the performance for color assets by caching the resolved colors.
- Core Data:
entityNameis now correctly a
class varinstead of a
- Strings: we now correctly generate the type
- Colors: Reduce initializer type inference for improved compilation performance.
- Config Lint: fix config lint not processing relative paths containing ".." correctly.
- Core Data: the generated code was missing
,(comma) for fetch requests with multiple arguments.
- Colors: Fix compile time warning when long expression type checking is enabled.
- The main branch of the repository has been renamed from
stable. If you pointed your
Podfileor dependency managment tool to
masterinstead of an official release/tag, you will have to update the branch name in your dependency file.
- Documentation: Improved doc for creating custom templates, and added a Documentation Table of Contents.
- Refactoring: Reduce globals & rearrange CLI code.
- Moved generated test output files into subdirectories per template.
- Compile generated output using configuration files for easier management.
- XCAssets: renamed the catalogs we use for sample code & testing to avoid some confusion.
- Update SwiftLint and enable some extra SwiftLint rules.
- Some CI fixes related to software versions.
- Updated to CocoaPods 1.9.0.
- Updated Pods and Gems dependencies.