All Versions
56
Latest Version
Avg Release Cycle
88 days
Latest Release
-
Changelog History
Page 1
Changelog History
Page 1
-
v6.6.2 Changes
π Changes in core dependencies of SwiftGen
π Bug Fixes
- π Strings: correctly handle translations containing
\t
(tabs) and other escape sequences.
David Jennes #985 #986 #988 #998 - Strings: fix the Objective-C template.
David Jennes #990 #991
Internal Changes
- π Strings: greatly improve the performance of the new comments parser.
David Jennes #987 #989
- π Strings: correctly handle translations containing
-
v6.6.1 Changes
π Changes in core dependencies of SwiftGen
π Bug Fixes
- π CLI: fixed
run parser
when noparams
oroptions
are provided (broken in 6.6.0).
David Jennes #983 - π JSON/Plist/YAML: fixed code generation (broken in 6.6.0).
David Jennes #983
- π CLI: fixed
-
v6.6.0 Changes
π Changes in core dependencies of SwiftGen
π₯ Breaking Changes
- π Strings: due to the bugfix for fallback translations, custom
lookupFunction
s will need to accept 3 arguments (table, key and value), up from 2 arguments (table and key).
David Jennes #964
π Deprecations
- β
The Swift 4 templates are now deprecated. This means we will no longer test if the generated output is valid Swift code. We will still try to keep these up-to-date with context changes.
David Jennes #955 - π Our spacing & trimming "hack" is now considered deprecated, and in the next major version we'll switch to Stencil's new "smart" trimming behaviour (see Stencil documentation for more information). Our built-in templates have already switched to this modern behaviour, you can try it with your own templates by using the
--experimental-modern-spacing
flag.
David Jennes #977 - π± XCAssets: some old properties & parameters are being deprecated. Read the migration guides for more information.
David Jennes #978
π New Features
- β Added support for
--quiet/-q
flag, to suppress all logs (except errors).
Andre113 #823 #846 - CoreData: ensure generated classes are
final
when model isn't abstract.
grsouza #940 - β Added
.artifactbundle
release uploads to support SE-0325 Swift Plugins.
nicorichard #913 #926 - π Strings: added support for
.strings
files comments. The built-in templates will now use them for comments instead of the translation of a key.
CraigSiemens #563 #813 - π CoreData: support derived attributes.
David Jennes #928 #961 - β Added an experimental flag
--experimental-modern-spacing
to enable modern spacing control, see Stencil documentation for more information. It will disable our own trimming "hack", and enable Stencil's "smart" trimming.
David Jennes #977 - π± XCAssets & Fonts: added support for SwiftUI. You can now easily access colors images, symbols and custom fonts from your SwiftUI code.
David Jennes #979
π Bug Fixes
- CoreData: ensure fetched properties use the right class name.
David Jennes #936 #960 - CoreData: now correctly generate code for
OptionSet
attributes by setting the "User Info" keynonOptionalInit
to true.
David Jennes #727 #965 - Fonts: fix file-type check in sandboxed environments.
David Jennes #952 #967 - π Fixed Stencil tags that can refer to other templates, such as the
include
tag.
David Jennes #950 #959 - π Strings: now correctly provides the default translation as fallback.
David Jennes #381 #937 #964
Internal Changes
- β‘οΈ Updated GitHub Actions to use macOS 12.
David Jennes #956 - β‘οΈ Update dependencies such as SwiftLint (and enable some extra rules).
David Jennes #968 #970 - Implement automatic publication using GitHub Actions.
David Jennes #969 - π Switched from Commander to Swift's own ArgumentParser library.
David Jennes #966 - β‘οΈ Updated to Stencil 0.15 and StencilSwiftKit 2.10.
David Jennes #977 - β Added
Difference
library for easier testing of context differences.
David Jennes #981
- π Strings: due to the bugfix for fallback translations, custom
-
v6.5.1 Changes
π Bug Fixes
- βͺ Workaround for Mint that does not yet support the SPM resource bundle.
@tid-kijyun #883 #885
Internal Changes
- π Tweak release script to handle both universal & slim builds.
David Jennes #884
- βͺ Workaround for Mint that does not yet support the SPM resource bundle.
-
v6.5.0 Changes
π Changes in core dependencies of SwiftGen
π New Features
- π± XCAssets: the parser now supports Symbol sets, so you can safely use custom symbols.
David Jennes #788 - π± XCAssets: you can now provide a trait collection when initializing a color or image asset (on iOS/tvOS).
David Jennes #790 - π Files: Add new parser for accessing loose files in your project.
Mike Gray David Jennes #665 #734 - π Colors: The XML parser now supports Android color aliases (using
@color/...
).
David Jennes #562 #797 - π Support M1 and Intel devices (universal binary).
David Jennes #805 #880
π Bug Fixes
- π± XCAssets: fixed some availability annotations that were incorrect.
David Jennes #789 - π Strings:
objc-h
template now emits valid documentation comments.
@szotp #822 - Generate
xcfilelist
: Adds the template file path to the inputsxcfilelist
(for custom templates).
Craig Siemens #815 - π Strings: built-in templates now have better handling of multi-line translations.
@mrackwitz #774
Internal Changes
- Switch to GitHub Actions.
#794 David Jennes - π¦ Switched the whole project over to use Swift Package Manager, restructuring some of the internals in the process.
David Jennes #793 - β‘οΈ Updated dependencies and gems, particularyly PathKit to support Xcode 13.
David Jennes Jared Sorge #827 #874 #879
- π± XCAssets: the parser now supports Symbol sets, so you can safely use custom symbols.
-
v6.4.0 Changes
October 07, 2020π New Features
- π¦ The built-in templates will now correctly handle Swift Package Manager resources, using
Bundle.module
if it's available. As before, you can override the usedBundle
using thebundle
orlookupFunction
template parameters.
Arnaud Dorgans #763 - β Added
config generate-xcfilelist
subcommand to generate input and outputxcfilelist
s based on your configuration file. These files should then be used in an Xcode build step that executesswiftgen config run
. Don't forget to regenerate the file lists after adding/removing resources in your project in a way that might impact them.
@CraigSiemens #441 - 0οΈβ£ Colors: the XML parser now accepts a
colorFormat
option, used to change the color format. The default format isrgba
.
@kevinstier #562 #768 - π IB: Added support for instantiating scenes while providing a
creator
block, commonly used for dependency injection. This feature is available in generated code starting from iOS 13, tvOS 13 and macOS 10.15.
@matsune David Jennes #778
π Bug Fixes
- β‘οΈ Plist: Update the parsing strategy (using
Codable
) to fix parsing ofBool
values asInteger
in some cases.
@fortmarek Olivier Halligon #779 - π JSON/Plist/YAML: fixed issue with
inline
templates which incorrectly generated1
/0
as values, instead oftrue
/false
as expected.
David Jennes #779 #783 - π JSON: the parser now correctly recognizes
0
and1
asInt
(instead ofBool
).
David Jennes #786
Internal Changes
- π¦ The built-in templates will now correctly handle Swift Package Manager resources, using
-
v6.3.0 Changes
August 04, 2020π Deprecations
- π Fonts: the generated
Font
typealias (toUIFont
/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 thestruct
representing a font to something else.
David Jennes
#728 - π Fonts: the templates now support a new
fontAliasName
that you can use to change thetypealias
's name fromFont
to something else. For example: this is useful when working with SwiftUI which already defines aFont
type. Note that as thistypealias
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 addsmakeFetchRequest()
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 themain
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 alookupFunction
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
- π Fonts: the generated
-
v6.2.1 Changes
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 ofdocument
. The olddocuments
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
Array
s 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 ofYams
for parsing JSONs, making thejson
parser faster.
Marcelo Fabri
#698 - π JSON/Plist/YAML: Lazily evaluate
metadata
of documents, making SwiftGen faster if themetadata
field is never used in a template.
Marcelo Fabri
#700
- π JSON & Plist: if you wrote your own templates, know that the
-
v6.2.0 Changes
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
andimageAliasName
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 ofswiftgen run <parser>
. See "New Features" below.
Olivier Halligon #705 - π The subcommand
swiftgen templates
has been renamedswiftgen template
(singular); the plural form of the command has been deprecated and will be removed in next major version.
Olivier Halligon #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. UsetemplatePath
to reference custom templates by path instead.
Olivier Halligon #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 useswiftgen run <parser>
for things like quick iterations when writing your own custom templates.
Olivier Halligon #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).
Olivier Halligon #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.
Olivier Halligon #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 asenum
,OptionSet
, β¦). They'll check the "User Info" of an attribute for aRawType
key, which should be set to the type name you want to use for that attribute. To avoid optional attributes, you can also add theunwrapOptional
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 Olivier Halligon #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.
Olivier Halligon #706 - π XCAssets: improved the performance for color assets by caching the resolved colors.
David Jennes #578 #589 - Core Data:
entityName
is now correctly aclass var
instead of aclass func
.
David Jennes #590 - Strings: we now correctly generate the type
Any
(instead ofString
) 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
tostable
. If you pointed yourPodfile
or dependency managment tool tomaster
instead of an official release/tag, you will have to update the branch name in your dependency file.
Olivier Halligon #714 - π Documentation: Improved doc for creating custom templates, and added a Documentation Table of Contents.
Olivier Halligon #713 - π¨ Refactoring: Reduce globals & rearrange CLI code.
Olivier Halligon #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
- 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.
-
v6.1.0 Changes
January 29, 2019π Changes in core dependencies of SwiftGen
π New Features
- β Adds support for generating code from Core Data models.
Grant Butler David Jennes Igor Palaguta #455 #567 #575 #581 #45 #185 #191 #195 - Config: expand environment variables in YAML files.
Wolfgang Lutz #355 #564 - Each command now accepts a
filter
option, which accepts a regular expression for filtering input paths. The filter is applied to individual paths as well as when the command recurses into directories.
David Jennes #383 #570
π Bug Fixes
- π Colors: Fix an issue where the
public
access modifier was not being added correctly in theliterals-swift3
andliterals-swift4
templates when thepublicAccess
parameter was specified. Also remove some uneccessarypublic
access modifiers from theswift3
andswift4
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
- β Adds support for generating code from Core Data models.