SwiftGen v6.3.0 Release Notes

Release Date: 2020-08-04 // 3 months ago
  • ๐Ÿ—„ 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

Previous changes from v6.2.1

  • ๐Ÿ“š 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