All Versions
50
Latest Version
Avg Release Cycle
90 days
Latest Release
56 days ago

Changelog History
Page 1

  • v6.3.0

    August 04, 2020

    πŸ—„ Deprecations

    • πŸš€ Fonts: the generated Font typealias (to UIFont/NSFont) is deprecated and will be removed in the next major release.
      David Jennes
      #728

    πŸ†• New Features

    • πŸ‘ Strings: support for plurals declared in .stringsdict files.
      Florian Fittschen
      #184
      #634
    • πŸ‘ Fonts: the templates now support a new fontTypeName template parameter that you can use to change the name of the struct representing a font to something else.
      David Jennes
      #728
    • πŸš€ Fonts: the templates now support a new fontAliasName that you can use to change the typealias's name from Font to something else. For example: this is useful when working with SwiftUI which already defines a Font type. Note that as this typealias is deprecated (see deprecations above), this template parameter will also be removed in the next major release.
      David Jennes
      #647
      #728
    • πŸ—„ CoreData: Deprecates fetchRequest() and adds makeFetchRequest() to avoid ambiguous function usage.
      David Rothera
      #726
    • 🍎 XCAssets: image assets now load faster on macOS if they're in the main bundle. MacOS only provides a caching mechanism for images in the main bundle, for other cases you may need to provide your own caching mechanism as needed.
      David Jennes
      #648
      #733
    • πŸ“š Fonts/IB/JSON/Plist/Strings/XCAssets: all templates that load data at runtime from a bundle now support a bundle template parameter, which you can use to override the bundle from which resources are loaded. Check out the template specific documentation for more information. For an in-depth explanation, also check the customize loading of resources article.
      David Jennes
      #737
    • πŸ“š Fonts/IB/JSON/Plist: Similar to the strings templates, these templates now support a lookupFunction template parameter, which allows you to provide your own resource lookup mechanism at runtime. Check the template specific documentation for more information. For an in-depth explanation, also check the customize loading of resources article.
      David Jennes
      #738

    πŸ› Bug Fixes

    • Strings: fix incorrect interpretation of format placeholders when there were missing positional parameters (e.g. "%2$@" without a %1$… defined).
      @AliSoftware
      #634
  • v6.2.1

    July 05, 2020

    πŸ“š There are no major changes in this release, although JSON & Plist template writers may want to read the small migration guide to prepare for upcoming context changes.

    πŸ—„ Deprecations

    • πŸš€ JSON & Plist: if you wrote your own templates, know that the documents property of a file has been deprecated in favour of document. The old documents property will be removed in the next major release.
      David Jennes
      #702
      #732

    πŸ› Bug Fixes

    • 0️⃣ Prevent generating default.profraw (code coverage) files.
      David Jennes
      #722
    • JSON/Plist/YAML: Fix issue with homogeneous Arrays in the Inline templates (such as [String]).
      #687
      @fjtrujy
    • 🍎 Avoid breaking the system swift installation when installing SwiftGen via Homebrew on macOS 10.14.4 or higher.
      David Jennes
      #686
      #730

    Internal Changes

    • πŸ”§ Parsers are now executed in parallel, making SwiftGen faster when multiple parsers are used. Note: only applies when using a configuration file.
      Marcelo Fabri
      #699
    • πŸ“œ Use JSONSerialization instead of Yams for parsing JSONs, making the json parser faster.
      Marcelo Fabri
      #698
    • πŸ“‡ JSON/Plist/YAML: Lazily evaluate metadata of documents, making SwiftGen faster if the metadata field is never used in a template.
      Marcelo Fabri
      #700
  • v6.2.0

    June 18, 2020

    πŸ”§ ⚠️ This minor version contains a lot of deprecations that may apply to your configuration and how you use SwiftGen. With the exception of swift3 templates (which have been removed), everything should still work as before. But be warned that all features marked as deprecated will be removed in SwiftGen 7.0.

    πŸ“š Read the [SwiftGen 6.2 Migration Guide](Documentation/MigrationGuide.md#migrating-to-swiftgen-62) for a list of changes you'll need to apply.

    πŸ’₯ Breaking Changes

    • 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.
      David Jennes #601 #691

    πŸ—„ Deprecations

    • πŸš€ XCAssets: the colorAliasName and imageAliasName template parameters are now deprecated and will be removed in the next major release.
      David Jennes #614
    • πŸ‘€ The use of swiftgen <parser> (e.g. swiftgen strings, swiftgen xcassets, …) command line for running individual parsers is now deprecated in favor of swiftgen run <parser>. See "New Features" below.
      @AliSoftware #705
    • 🚚 The subcommand swiftgen templates has been renamed swiftgen template (singular); the plural form of the command has been deprecated and will be removed in next major version.
      @AliSoftware #697
    • 🚚 The ability for SwiftGen to search custom named templates in ~/Library/Application Support has 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 templatePath to reference custom templates by path instead.
      @AliSoftware #717

    πŸ†• New Features

    • 🐎 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.
      @AliSoftware #705
    • 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).
      @AliSoftware #694
    • πŸ“š 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.
      @AliSoftware #697
    • πŸ“š Each parser now accepts an options dictionary, with which you can set internal parser settings to change its behaviour. See the parser's specific documentation for available options.
      David Jennes #587 #597
    • πŸ“š Strings: the parser now accepts a separator option, used to split keys into structured components. The default separator remains .. For more information, check the [parser's documentation](Documentation/Parsers/strings.md#customization).
      David Jennes #576 #588
    • πŸ“š Core Data: the built-in templates now support an optional extraImports parameter. 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](Documentation/templates/coredata/swift4.md#customization).
      David Jennes #591 #592
    • πŸ“š Core Data: the built-in templates now support RawRepresentable attributes (such as enum, OptionSet, …). They'll check the "User Info" of an attribute for a RawType key, which should be set to the type name you want to use for that attribute. To avoid optional attributes, you can also add the unwrapOptional user info key. For more information, check the [template's documentation](Documentation/templates/coredata/swift4.md#userinfo-keys).
      David Jennes #566 #609 #593 #610
    • πŸ“š Strings: the built-in templates now accept a parameter lookupFunction for customizing the localization function, check the [template documentation](Documentation/templates/strings/) for more information.
      Steven Magdy 426 468 573 716
    • πŸ“š Strings: templates to generate Objective-C. Please check [the template's documentation](Documentation/templates/strings/objc.md) for more information.
      Eric Slosser SwiftGen/SwiftGen#378
    • 🍱 XCAssets: the parser now supports AR Resource Groups, together with reference images and objects.
      David Jennes #614
    • 🐎 Templates: Bundle now use static property on BundleToken for better performance.
      shuoli84 #623
    • πŸ“œ All parsers now have built-in Swift 5 templates.
      David Jennes #595 #600
    • 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.
      Viktoras Laukevičius #669 @AliSoftware #693

    πŸ› Bug Fixes

    • πŸ‘ SwiftGen now properly shows a better help message and the command usage when running an incomplete command, instead of complaining about a config file.
      @AliSoftware #706
    • 🐎 XCAssets: improved the performance for color assets by caching the resolved colors.
      David Jennes #578 #589
    • Core Data: entityName is now correctly a class var instead of a class func.
      David Jennes #590
    • Strings: we now correctly generate the type Any (instead of String) for %@ placeholders.
      David Jennes 620
    • 🐎 Colors: Reduce initializer type inference for improved compilation performance.
      Markus Faßbender #663
    • πŸ‘• Config Lint: fix config lint not processing relative paths containing ".." correctly.
      Wolfgang Lutz #688
    • Core Data: the generated code was missing , (comma) for fetch requests with multiple arguments.
      David Jennes #692
    • ⚠ Colors: Fix compile time warning when long expression type checking is enabled.
      Ryan Mason-Davies #704 #710

    Internal Changes

    • πŸš€ The main branch of the repository has been renamed from master to stable. If you pointed your Podfile or dependency managment tool to master instead of an official release/tag, you will have to update the branch name in your dependency file.
      @AliSoftware #714
    • πŸ“š Documentation: Improved doc for creating custom templates, and added a Documentation Table of Contents.
      @AliSoftware #713
    • ♻️ Refactoring: Reduce globals & rearrange CLI code.
      @AliSoftware #586
    • 🚚 Moved generated test output files into subdirectories per template.
      David Jennes #598
    • πŸ”§ Compile generated output using configuration files for easier management.
      David Jennes #365 #599
    • 🍱 XCAssets: renamed the catalogs we use for sample code & testing to avoid some confusion.
      David Jennes #613
    • ⚑️ Update SwiftLint and enable some extra SwiftLint rules.
      David Jennes #617
    • πŸ‘· Some CI fixes related to software versions.
      Patrick Nollet #645
    • ⚑️ Updated to CocoaPods 1.9.0.
      David Jennes #619
    • ⚑️ Updated Pods and Gems dependencies.
      David Jennes #684
  • v6.1.0

    January 29, 2019

    πŸ”„ Changes in core dependencies of SwiftGen

    πŸ†• New Features

    πŸ› Bug Fixes

    • 🚚 Colors: Fix an issue where the public access modifier was not being added correctly in the literals-swift3 and literals-swift4 templates when the publicAccess parameter was specified. Also remove some uneccessary public access modifiers from the swift3 and swift4 templates.
      Isaac Halvorson #549

    Internal Changes

    • Resolve path if the binary is a symbolic link in order to find bundled templates.
      Liquidsoul #559
    • ⚑️ Update to SwiftLint 0.30.1 and enable some extra SwiftLint rules.
      David Jennes #574 #583
  • v6.0.2

    October 07, 2018

    πŸ”„ Changes in other SwiftGen modules

    πŸ› Bug Fixes

    • Strings: rolled back the changes in #503, to ensure %% is correctly unescaped.
      David Jennes
      #542
    • Strings: generate the correct types for %c and %p.
      David Jennes
      #543
    • SPM/Mint: SwiftGen now provides correct version information, instead of "0.0".
      David Jennes
      #544
  • v6.0.1

    October 04, 2018

    πŸ”„ Changes in core dependencies of SwiftGen

    πŸ› Bug Fixes

    • IB: Fix missing import AppKit/import UIKit in some rare cases.
      David Jennes #515 #519
    • 🍎 IB: Fix issue with segues-swift4 template when compiled with Swift 4.2 on macOS.
      Olivier Halligon #515 #518
    • ⚑️ SPM/Mint: Update the Stencil version to 0.13.1.
      David Jennes #527
    • πŸ—„ Ensure the templates subcommand properly works with the deprecated storyboards subcommand.
      David Jennes #525 #530
    • πŸ”§ Ensure configuration file errors show as red in Xcode.
      Olivier Halligon #516 #533
    • πŸ“œ Strings: Ensure the parser correctly handles keys ending with a . and empty key components.
      David Jennes #528 #531

    Internal Changes

  • v6.0.0

    September 29, 2018

    πŸš€ ⚠️ This major version is a big milestone in which a lot of refactoring and cleaning has been done. Many features added over previous releases have been reworked and unified, while also preparing SwiftGen for future additions. This means that you'll need to adapt your configuration files (or command line invocations) and custom templates to work with this new major version.

    πŸ“š Read the SwiftGen 6.0 Migration Guide for a list of changes you'll need to apply.

    πŸ”„ Changes in other SwiftGen modules

    πŸ’₯ Breaking Changes

    • 🚚 Don't normalize string keys while parsing, let all transformation be done on template side. This makes the developer responsible to keep the language file organized, duplications won't be removed.
      Diego Chohfi
      #257
    • βœ‚ Remove Swift 2 support.
      David Jennes
      #420
    • 🚚 Renamed the storyboards command to ib, to better reflect it's purpose. An alias for storyboards still exists, but it will be removed at some point.
      David Jennes
      #423
    • 🍱 XCAssets: the generated templates won't namespace groups by default anymore, use the forceProvidesNamespaces flag to enable this behaviour again.
      jechris
      #453
    • 🍱 XCAssets: the templates won't generate any all-values accessors anymore by default. Use the allValues flag to enable this behaviour again. Note: this replaces the old noAllValues flag (with an inverse behaviour).
      David Jennes
      #480
    • 🍱 XCAssets: Dropped the deprecated allValues constant, use the type specific constants such as allColors, allDataItems and allImages. The default value of imageAlias has also been changed from Image to AssetImageTypeAlias, to be consistent with the other types.
      David Jennes
      #482
    • πŸ— Interface Builder: split up the storyboards template into 2 parts, one for scenes and one for segues.
      David Jennes
      #419

    πŸ†• New Features

    • βž• Add ability to list all custom fonts and register them using FontFamily.registerAllCustomFonts.
      Olivier Halligon
      #394
    • βž• Add support for Swift Package Manager and Mint.
      Yonas Kolb
      #411
    • πŸ‘• The swiftgen.yml config file now accepts multiple outputs for each command, allowing you to generate multiple outputs from the same files and content. This also means that the output parameter is now deprecated, in favour of the outputs parameter, and it may be removed in a future version of SwiftGen. Similarly, the paths parameter has been renamed to inputs for consistency. You can always use swiftgen config lint to validate your configuration file.
      David Jennes
      #424
      #510
    • πŸ‘• Use swiftlint:disable all in generated files to avoid interference with SwiftLint rules custom to the host project.
      Frederick Pietschmann
      David Jennes
      #409
      #506
    • 🍱 XCAssets: Added support for NSDataAssets.
      Oliver Jones
      #444
    • πŸ‘ Organised the generated code in sections for better readability, with all generated constants at the top of the file.
      David Jennes
      Olivier Halligon
      #456
      #481
    • βž• Added support for JSON, Plist and YAML files using the swiftgen json, swiftgen plist and swiftgen yaml commands. The parsed contexts and the generated files for each command have been kept quite similar, for easier switching between file formats.
      John T McIntosh
      Toshihiro Suzuki
      Peter Livesey
      David Jennes
      #379
      #359
      #288
      #188
      #493
      #504
    • ⚑️ Updated the playgrounds with the new json, plist and yaml commands, and updated the other pages to reflect the template changes.
      David Jennes
      #495
    • πŸ”§ We're deprecating the old --template CLI option in favor of --templateName, to better match the naming of the other options and the configuration file. The old --template option will remain until the next major version.
      David Jennes
      #509

    πŸ› Bug Fixes

    • πŸ›  Fix memory leak in generated code for Fonts.
      Olivier Halligon
      #394
    • πŸ— Interface Builder: ensure the templates handle GLKViewController, AVPlayerViewController and NSPageController correctly.
      David Jennes
      #404
      #414
    • πŸ— Interface Builder: ensure the parser can handle files with and without "trait variations".
      David Jennes
      #367
      #429
    • 🚚 Restrict SceneType and InitialSceneType to UIViewController when not targeting AppKit. When targeting AppKit, remove superfluous Any.
      Darron Schall
      #463
      #464
    • Fonts: disable a warning in generated font files for projects with conditional_returns_on_newlines SwiftLint rule enabled.
      Ryan Davies
      #436
      #465
    • πŸ— Interface Builder: the parser and templates now handle the "Inherit module from target" setting.
      David Jennes
      #435
      #485
    • πŸ“œ Strings: the parser now correctly handles formats such as % d and %#x.
      David Jennes
      #502
    • Strings: ensure strings without arguments are not processed using String(format:).
      David Jennes
      #503

    Internal Changes

  • v5.3.0

    May 16, 2018

    πŸ”„ Changes in core dependencies of SwiftGen

    πŸ†• New Features

    Internal Changes

    • 🚧 Merged the SwiftGenKit and templates repositories back into this repository for easier development and maintenance.
      David Jennes #356
  • v5.2.1

    October 24, 2017

    πŸ› Bug Fixes

    • πŸ›  Fix SwiftGen no longer working using CLI parameters (instead of config file).
      David Jennes #347
    • Errors now properly exit with a non-zero exit code.
      Olivier Halligon #348
    • πŸ–¨ swiftgen --help prints the full help back again (and not just the help of the default config run subcommand).
      Olivier Halligon #349
  • v5.2.0

    October 22, 2017

    πŸ”„ Changes in other SwiftGen modules

    πŸ†• New Features

    πŸ› Bug Fixes