Changelog History
Page 3
-
v3.0.1 Changes
- ➕ Add support for Xcode 8 and Swift 2.3.
(Should still compile in Xcode 7.3 but theRakefile
to build, install and release requires Xcode 8).
Valentin Knabel Ignacio Romero Zurbuchen HanxuanZhou Syo Ikeda
- ➕ Add support for Xcode 8 and Swift 2.3.
-
v3.0.0 Changes
- ➕ Add template that calls
NSLocalizedString()
separately for each string, which is useful when trying to extract strings in the app to a.strings
file.
Ahmet Karalar - ➕ Add some
file_length
and similar SwiftLint exceptions in bundled templates, as files generated by SwiftGen might contain lots of constants and can be long by design.
Olivier Halligon - 🖨 Error messages ("template not found", etc) are now printed on
stderr
.
Olivier Halligon - ➕ Add more
swiftgen templates
subcommands.
Olivier Halligonswiftgen templates list
lists all the available templatesswiftgen templates which <name>
prints the path to the template named<name>
swiftgen templates cat <name>
prints the content to the template named<name>
<name>
here can be either a parser name likecolors
or a composed namecolors-rawValue
for a specific template.
- 🛠 Fix swift 3 renaming change in strings-swift3.stencil.
Kilian Koeltzsch #150 - 🛠 Fix non-custom class, non-base view controller handling in storyboards-swift3.stencil.
Syo Ikeda #152 - ➕ Add strongly typed
initialViewController()
overrides for storyboard templates if available.
Syo Ikeda #153 #163 - ➕ Add support for font files containing multiple descriptors.
Chris Ellsworth #156 - ⚡️ Update deprecated usage of generics for Swift 3 / Xcode 8 beta 6.
Chris Ellsworth #158 - 🛠 Fix case when missing positional parameters, which leads to parameters in the enum with
unspecified type (undeterminable from the
Localizable.strings
format analysis) where reported asAny
— which is not aCVarArgType
. Now usingUnsafePointer<()>
arguments instead for such odd edge-cases that should never happen anyway.
Olivier Halligon - 📜 Now reports an error when it failed to parse a color in a color input file.
Olivier Halligon #162 - 🆕 New Strings template (available via
-t dot-syntax
), allowing string keys containing dots (like foo.bar.baz) to be organized as a hierarchy and accessible via dot syntax.
Cihat Gündüz #159 - ⚡️ Update Swift 3 templates to use lowercase enums.
Olivier Halligon #166 - 🆕 New Strings template (available via
-t dot-syntax-swift3
), allowing keys with dots in Swift 3 (see above).
Cihat Gündüz #168
💡 You can now create your custom templates more easier than ever, by cloning an existing template!
0️⃣ > e.g. to clone the default
strings-default.stencil
template:- use
swiftgen templates cat strings --output strings-custom.stencil
👯 > * modify the clonedstrings-custom.stencil
template to your liking - use it with
swiftgen strings … --templatePath strings-custom.stencil …
in your projects!
Important Notes
- Some keys for various templates have changed to provide more flexibility and enable some new features in the templates. As a result, if you created your own custom templates, they might not all be totally compatible with SwiftGen 3.0.0 (hence the new major version). 📚 Please read the Custom Templates documentation to find out the new Stencil context keys and update your custom templates accordingly.
⚡️ If you're using one of the bundled templates, all of them have been updated appropriately.
- Also if you use Swift 3, and thus use the
-t swift3
flag to use the Swift 3 templates, be advised those has been modified to take the latest Swift 3 modifications into account (including naming convensions) so your code might need to be updated according to match the latest Swift 3 recommendations.
- ➕ Add template that calls
-
v2.0.0 Changes
- 🛠 Fix issue with txt files bailing on comments.
Derek Ostrander #140 - ➕ Added support for tvOS and watchOS in images, fonts and color templates.
Tom Baranes #145 - ➕ Added enum-based structured identifiers via
-t structured
option.
Cihat Gündüz #148 - ➕ Added support for OSX in storyboards.
Tom Baranes #131
Note: The
Stencil
context keys (the name of the variables used in templates) for storyboard has changed a bit. 👀 Especially,class
has been renamed intocustomClass
(see #131) to better describe the intent (as this isn't defined if there is no custom class set in the Storyboard), and 🆕 new keysisBaseViewController
andbaseType
has been added.This means that if you did implement your own custom templates for storyboards (instead of using the bundled ones), you'll have to remplace
{{class}}
by{{customClass}}
in those storyboard templates, otherwise they'll probably stop working as expected. That's the main reason why the version has been bumped to a major version 2.0.0. - 🛠 Fix issue with txt files bailing on comments.
-
v1.1.2 Changes
- 🛠 Fix issue introduced by 1.1.1 in storyboard templates not returning.
Ben Chatelain #138
- 🛠 Fix issue introduced by 1.1.1 in storyboard templates not returning.
-
v1.1.1 Changes
- ✂ Removed the last force-unwrap from storyboard templates.
Olivier Halligon
- ✂ Removed the last force-unwrap from storyboard templates.
-
v1.1.0 Changes
- ➕ Added step to ensure all templates are Swiftlint'ed
and don't violate any code style rule.
Olivier Halligon AJ9 #80 - ➕ Added support for OSX in images, fonts and color templates.
Tom Baranes #125 #126 #127 - ➕ Added missing FontConvertible protocol conformance to default fonts template.
Ben Chatelain #129
- ➕ Added step to ensure all templates are Swiftlint'ed
and don't violate any code style rule.
-
v1.0.0 Changes
- ↪ Restructured colors & fonts templates to workaround the same LLVM issue as #112 with nested types
inside existing UIKit classes in Release/Optimized builds.
Olivier Halligon - ➕ Added support for Fonts using the
swiftgen fonts
command.
Derek Ostrander #102 - ➕ Added support for TXT (
colors.txt
) files to have named value.
Derek Ostrander #118 - ↪ Restructured image templates to work around an LLVM issue with nested types.
Ken Grigsby #112 - ➕ Added Swift 3 templates for storyboards and strings.
Andrew Breckenridge #117
- ↪ Restructured colors & fonts templates to workaround the same LLVM issue as #112 with nested types
inside existing UIKit classes in Release/Optimized builds.
-
v0.8.0 Changes
- 👀 Introducing alternative way to install SwiftGen: using CocoaPods! See README for more details.
Olivier Halligon #95 - ➕ Added support for JSON (
colors.json
) files as input for theswiftgen colors
subcommand.
Derek Ostrander - 👉 Use
String(format:locale:arguments:)
and theNSLocale.currentLocale()
in the "string" templates so that it works with.stringdict
files and pluralization.
Olivier Halligon #91 - ➕ Add support for Android
colors.xml
files as input for theswiftgen colors
subcommand.
Olivier Halligon #15 - ✂ Removed the useless
import Foundation
from the "images" templates.
Olivier Halligon - ➕ Added computed property
var color: UIColor
to the color templates.
Olivier Halligon
- 👀 Introducing alternative way to install SwiftGen: using CocoaPods! See README for more details.
-
v0.7.6 Changes
✨ Enhancements
- 🛠 Fixed build loop by changing SwiftGen to only write to the output file if the generated code is different from the file contents.
Mathias Nagler #90
🛠 Fixes
- Fixed typos in code and descriptions: instanciate -> instantiate. Please note that the default template used for storyboards
storyboards-default.stencil
had to be modified, so make sure to update your codebase accordingly.
Pan Kolega #83 - 🛠 Fixed issue in
Rakefile
when trying to install viarake
in a path containing~
.
Jesse Armand #88
- 🛠 Fixed build loop by changing SwiftGen to only write to the output file if the generated code is different from the file contents.
-
v0.7.5 Changes
✨ Enhancements
- ⚡️ Updated stencils and unit tests to pass SwiftLint.
Adam Gask #79 - ⚡️ Updated
storyboards-default.stencil
to better avoid name confusions.
Olivier Halligon- Now
cases
names are suffixed with…Scene
andstatic func
are prefixed withinstantiate…
to lower the risks of a name conflict with your ViewController classes. - The old template is still available but has been renamed
storyboards-uppercase.stencil
- Now
- ➕ Added support for
*.clr
files (files to storeNSColorList
's presented in Color Picker on "Color Palettes" tab).
Ilya Puchka #81
- ⚡️ Updated stencils and unit tests to pass SwiftLint.