- Allow using custom templates by name. (#42, #50)
- Now the
-t
flag expect a template name (defaults todefault
), and will search a matching template inApplication Support
first, then in the templates bundled with SwiftGen. - You can still specify a template by path using
-p
. - For more info, see this dedicated documentation.
- Now the
- You can now list all templates available (both bundled templates and custom ones) using the
swiftgen templates
command. (#42, #50) - Add a
performSegue(_:sender:)
extension onUIViewController
to accept aStoryboardSegue
as parameter.
You can now for example callvc.performSegue(UIStoryboard.Segue.Wizard.ShowPassword)
. (#37)
SwiftGen now comes bundled with some alternate templates, especially colors-rawValue
, images-allvalues
and storyboards-lowercase
, in addition to the default templates.
- Now
swiftgen storyboards
doesn't generate duplicate enum cases for identical segues (those having equal identifiers and shared custom class).
@filwag, #43 - Fix compilation issue for storyboards without any scene.
Viacheslav Karamov, #47 - Propose an alternate template using lowercase names, especially for when storyboard identifiers match view controller class names.
Viacheslav Karamov, #48 - Introduced an
image-allvalues
template that exposes the list of all images in astatic let allValues
array.
Ahmed Mseddi & Guillaume Lagorce, #44 - Fix issue with Storyboards without any StoryboardID (all scenes being anonymous) not extending
StoryboardScene
. (#36)
SwiftGen
now uses Stencil template engine to produce the generated code.- This means that the generate code will be easier to improve
- This also means that you can use your own templates to generate code that better suits your needs and preferences, using
swiftgen … --template FILE …
- The correct type of ViewController (
UIViewController
,UINavigationController
,UITableViewController
, …) is now correctly generated even if not a custom subclass. (#40) - Fix issue with
.strings
files encoded in UTF8 (#21)
- It's now possible to specify which chars should not be used when generating
case
identifiers.
@Igor-Palaguta, #34
- Installing via
rake install
orbrew install
will now copy the Swift dylibs too, so thatswiftgen
installation won't depend on the location of your Xcode.app (so it'll work on every machine even if you rename your Xcode). - Fixed links in Playground and Licence headers in source code.
- Migrating to Commander to parse the CLI arguments. (23, #30)
swiftgen
is now a single binary, and the subcommand names have changed to be more consistent. (#30)- New
--output
option. (#30)
You must now use the subcommands
swiftgen images
,swiftgen strings
,swiftgen storyboards
andswiftgen colors
. Seeswiftgen --help
for more usage info.
- Fix color parsing with absent alpha
@Igor-Palaguta, #28
- Updated Unit tests for latest Swift 2.0 & tested against Xcode 7.1
- Fix small typos in code
- Guard against empty
enums
- Updated for Xcode 7 Beta 5
swiftgen-storyboard
now allows to take a path to a.storyboard
file as argument (as an alternative to give a path to a whole directory)- The
-v
and--version
flags are now recognized and print the executable version.
- Reorganized files into an Xcode project with one target per executable (#2)
- Added Unit Tests (one per executable + one for common code) (#2)
- Improved
SwiftGen-L10n
parsing of format strings and placeholders. (#4, #5, #6) - Updated
Rakefile
so that it now invokesxcodebuild install
. You can now easily build & install allswiftgen-xxx
executables in/usr/local/bin
or anywhere else. - Added a version string (date + sha1) to the built executables (displayed when invoked with no argument)
- Reducted the default code generated by
SwiftGenColorEnumBuilder
to avoid clobbering theUIColor
namespace - Changed the "namespacing
enum
" inUIStoryboard
to astruct
to avoid confusion with the inner enums - The
UIStoryboard.Scene
enums now usestatic func
instead ofstatic var
for the dedicatedViewController
constructors ^(†)
^(†) because it feels more explicit that calling a function like UIStoryboard.Scene.Wizard.validatePasswordViewController()
will actually instanciate a new ViewController
, rather than returning an existing one.
- Added
Segues
enums toUIStoryboard
to be able to access their identifiers easily.
@esttorhe, #8 - Added this very
CHANGELOG.md
Considered to be the first cleaned-up version, far from finished but really usable with clean code.
- Cleaner README
- Namespace the generated
enums
in an outerenum
to avoid clobbering theUIStoryboard
namespace
- Introducing
SwiftGenColorEnumBuilder
swiftgen-colors
CLI- Added ability to choose indentation
- Introducing
SwiftGenL10nEnumBuilder
swiftgen-l10n
CLI- Started playing with
UIColor
enums in the playground
- Introducing
SwiftGenStoryboardEnumBuilder
class swiftgen-storyboard
CLI
Initial version:
- Mostly testing stuff in a playground
- Introducing
SwiftGenAssetsEnumBuilder
class swiftgen-assets
CLI