danger-localizationlinter 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +20 -0
  3. data/.travis.yml +12 -0
  4. data/Gemfile +6 -0
  5. data/Gemfile.lock +167 -0
  6. data/Guardfile +21 -0
  7. data/LICENSE.txt +22 -0
  8. data/README.md +62 -0
  9. data/Rakefile +25 -0
  10. data/danger-localizationlinter.gemspec +60 -0
  11. data/ext/localizationlinter/helper/validate_wording_cli.rb +21 -0
  12. data/ext/localizationlinter/localizationlinter.rb +331 -0
  13. data/ext/localizationlinter/swiftgen_localizables_check.stencil +36 -0
  14. data/lib/danger_localizationlinter.rb +3 -0
  15. data/lib/danger_plugin.rb +3 -0
  16. data/lib/localizationlinter/gem_version.rb +5 -0
  17. data/lib/localizationlinter/plugin.rb +96 -0
  18. data/spec/Test/Podfile +6 -0
  19. data/spec/Test/Podfile.lock +16 -0
  20. data/spec/Test/Pods/SwiftGen/CHANGELOG.md +1357 -0
  21. data/spec/Test/Pods/SwiftGen/LICENCE +21 -0
  22. data/spec/Test/Pods/SwiftGen/README.md +892 -0
  23. data/spec/Test/Pods/SwiftGen/bin/swiftgen +0 -0
  24. data/spec/Test/Pods/SwiftGen/lib/Commander.framework/Commander +0 -0
  25. data/spec/Test/Pods/SwiftGen/lib/Commander.framework/Resources/Info.plist +48 -0
  26. data/spec/Test/Pods/SwiftGen/lib/Commander.framework/Versions/A/Commander +0 -0
  27. data/spec/Test/Pods/SwiftGen/lib/Commander.framework/Versions/A/Resources/Info.plist +48 -0
  28. data/spec/Test/Pods/SwiftGen/lib/Commander.framework/Versions/A/_CodeSignature/CodeResources +132 -0
  29. data/spec/Test/Pods/SwiftGen/lib/Commander.framework/Versions/Current/Commander +0 -0
  30. data/spec/Test/Pods/SwiftGen/lib/Commander.framework/Versions/Current/Resources/Info.plist +48 -0
  31. data/spec/Test/Pods/SwiftGen/lib/Commander.framework/Versions/Current/_CodeSignature/CodeResources +132 -0
  32. data/spec/Test/Pods/SwiftGen/lib/Kanna.framework/Kanna +0 -0
  33. data/spec/Test/Pods/SwiftGen/lib/Kanna.framework/Resources/Info.plist +48 -0
  34. data/spec/Test/Pods/SwiftGen/lib/Kanna.framework/Versions/A/Kanna +0 -0
  35. data/spec/Test/Pods/SwiftGen/lib/Kanna.framework/Versions/A/Resources/Info.plist +48 -0
  36. data/spec/Test/Pods/SwiftGen/lib/Kanna.framework/Versions/A/_CodeSignature/CodeResources +132 -0
  37. data/spec/Test/Pods/SwiftGen/lib/Kanna.framework/Versions/Current/Kanna +0 -0
  38. data/spec/Test/Pods/SwiftGen/lib/Kanna.framework/Versions/Current/Resources/Info.plist +48 -0
  39. data/spec/Test/Pods/SwiftGen/lib/Kanna.framework/Versions/Current/_CodeSignature/CodeResources +132 -0
  40. data/spec/Test/Pods/SwiftGen/lib/PathKit.framework/PathKit +0 -0
  41. data/spec/Test/Pods/SwiftGen/lib/PathKit.framework/Resources/Info.plist +48 -0
  42. data/spec/Test/Pods/SwiftGen/lib/PathKit.framework/Versions/A/PathKit +0 -0
  43. data/spec/Test/Pods/SwiftGen/lib/PathKit.framework/Versions/A/Resources/Info.plist +48 -0
  44. data/spec/Test/Pods/SwiftGen/lib/PathKit.framework/Versions/A/_CodeSignature/CodeResources +132 -0
  45. data/spec/Test/Pods/SwiftGen/lib/PathKit.framework/Versions/Current/PathKit +0 -0
  46. data/spec/Test/Pods/SwiftGen/lib/PathKit.framework/Versions/Current/Resources/Info.plist +48 -0
  47. data/spec/Test/Pods/SwiftGen/lib/PathKit.framework/Versions/Current/_CodeSignature/CodeResources +132 -0
  48. data/spec/Test/Pods/SwiftGen/lib/Stencil.framework/Resources/Info.plist +48 -0
  49. data/spec/Test/Pods/SwiftGen/lib/Stencil.framework/Stencil +0 -0
  50. data/spec/Test/Pods/SwiftGen/lib/Stencil.framework/Versions/A/Resources/Info.plist +48 -0
  51. data/spec/Test/Pods/SwiftGen/lib/Stencil.framework/Versions/A/Stencil +0 -0
  52. data/spec/Test/Pods/SwiftGen/lib/Stencil.framework/Versions/A/_CodeSignature/CodeResources +132 -0
  53. data/spec/Test/Pods/SwiftGen/lib/Stencil.framework/Versions/Current/Resources/Info.plist +48 -0
  54. data/spec/Test/Pods/SwiftGen/lib/Stencil.framework/Versions/Current/Stencil +0 -0
  55. data/spec/Test/Pods/SwiftGen/lib/Stencil.framework/Versions/Current/_CodeSignature/CodeResources +132 -0
  56. data/spec/Test/Pods/SwiftGen/lib/StencilSwiftKit.framework/Resources/Info.plist +48 -0
  57. data/spec/Test/Pods/SwiftGen/lib/StencilSwiftKit.framework/StencilSwiftKit +0 -0
  58. data/spec/Test/Pods/SwiftGen/lib/StencilSwiftKit.framework/Versions/A/Resources/Info.plist +48 -0
  59. data/spec/Test/Pods/SwiftGen/lib/StencilSwiftKit.framework/Versions/A/StencilSwiftKit +0 -0
  60. data/spec/Test/Pods/SwiftGen/lib/StencilSwiftKit.framework/Versions/A/_CodeSignature/CodeResources +132 -0
  61. data/spec/Test/Pods/SwiftGen/lib/StencilSwiftKit.framework/Versions/Current/Resources/Info.plist +48 -0
  62. data/spec/Test/Pods/SwiftGen/lib/StencilSwiftKit.framework/Versions/Current/StencilSwiftKit +0 -0
  63. data/spec/Test/Pods/SwiftGen/lib/StencilSwiftKit.framework/Versions/Current/_CodeSignature/CodeResources +132 -0
  64. data/spec/Test/Pods/SwiftGen/lib/SwiftGenKit.framework/Resources/Info.plist +48 -0
  65. data/spec/Test/Pods/SwiftGen/lib/SwiftGenKit.framework/SwiftGenKit +0 -0
  66. data/spec/Test/Pods/SwiftGen/lib/SwiftGenKit.framework/Versions/A/Resources/Info.plist +48 -0
  67. data/spec/Test/Pods/SwiftGen/lib/SwiftGenKit.framework/Versions/A/SwiftGenKit +0 -0
  68. data/spec/Test/Pods/SwiftGen/lib/SwiftGenKit.framework/Versions/A/_CodeSignature/CodeResources +132 -0
  69. data/spec/Test/Pods/SwiftGen/lib/SwiftGenKit.framework/Versions/Current/Resources/Info.plist +48 -0
  70. data/spec/Test/Pods/SwiftGen/lib/SwiftGenKit.framework/Versions/Current/SwiftGenKit +0 -0
  71. data/spec/Test/Pods/SwiftGen/lib/SwiftGenKit.framework/Versions/Current/_CodeSignature/CodeResources +132 -0
  72. data/spec/Test/Pods/SwiftGen/lib/Yams.framework/Resources/Info.plist +48 -0
  73. data/spec/Test/Pods/SwiftGen/lib/Yams.framework/Versions/A/Resources/Info.plist +48 -0
  74. data/spec/Test/Pods/SwiftGen/lib/Yams.framework/Versions/A/Yams +0 -0
  75. data/spec/Test/Pods/SwiftGen/lib/Yams.framework/Versions/A/_CodeSignature/CodeResources +132 -0
  76. data/spec/Test/Pods/SwiftGen/lib/Yams.framework/Versions/Current/Resources/Info.plist +48 -0
  77. data/spec/Test/Pods/SwiftGen/lib/Yams.framework/Versions/Current/Yams +0 -0
  78. data/spec/Test/Pods/SwiftGen/lib/Yams.framework/Versions/Current/_CodeSignature/CodeResources +132 -0
  79. data/spec/Test/Pods/SwiftGen/lib/Yams.framework/Yams +0 -0
  80. data/spec/Test/Pods/SwiftGen/templates/colors/literals-swift4.stencil +43 -0
  81. data/spec/Test/Pods/SwiftGen/templates/colors/literals-swift5.stencil +43 -0
  82. data/spec/Test/Pods/SwiftGen/templates/colors/swift4.stencil +84 -0
  83. data/spec/Test/Pods/SwiftGen/templates/colors/swift5.stencil +84 -0
  84. data/spec/Test/Pods/SwiftGen/templates/coredata/swift4.stencil +211 -0
  85. data/spec/Test/Pods/SwiftGen/templates/coredata/swift5.stencil +211 -0
  86. data/spec/Test/Pods/SwiftGen/templates/fonts/swift4.stencil +110 -0
  87. data/spec/Test/Pods/SwiftGen/templates/fonts/swift5.stencil +113 -0
  88. data/spec/Test/Pods/SwiftGen/templates/ib/scenes-swift4.stencil +157 -0
  89. data/spec/Test/Pods/SwiftGen/templates/ib/scenes-swift5.stencil +159 -0
  90. data/spec/Test/Pods/SwiftGen/templates/ib/segues-swift4.stencil +60 -0
  91. data/spec/Test/Pods/SwiftGen/templates/ib/segues-swift5.stencil +60 -0
  92. data/spec/Test/Pods/SwiftGen/templates/json/inline-swift4.stencil +82 -0
  93. data/spec/Test/Pods/SwiftGen/templates/json/inline-swift5.stencil +82 -0
  94. data/spec/Test/Pods/SwiftGen/templates/json/runtime-swift4.stencil +112 -0
  95. data/spec/Test/Pods/SwiftGen/templates/json/runtime-swift5.stencil +112 -0
  96. data/spec/Test/Pods/SwiftGen/templates/plist/inline-swift4.stencil +82 -0
  97. data/spec/Test/Pods/SwiftGen/templates/plist/inline-swift5.stencil +82 -0
  98. data/spec/Test/Pods/SwiftGen/templates/plist/runtime-swift4.stencil +117 -0
  99. data/spec/Test/Pods/SwiftGen/templates/plist/runtime-swift5.stencil +117 -0
  100. data/spec/Test/Pods/SwiftGen/templates/strings/flat-swift4.stencil +97 -0
  101. data/spec/Test/Pods/SwiftGen/templates/strings/flat-swift5.stencil +97 -0
  102. data/spec/Test/Pods/SwiftGen/templates/strings/objc-h.stencil +66 -0
  103. data/spec/Test/Pods/SwiftGen/templates/strings/objc-m.stencil +90 -0
  104. data/spec/Test/Pods/SwiftGen/templates/strings/structured-swift4.stencil +102 -0
  105. data/spec/Test/Pods/SwiftGen/templates/strings/structured-swift5.stencil +102 -0
  106. data/spec/Test/Pods/SwiftGen/templates/xcassets/swift4.stencil +266 -0
  107. data/spec/Test/Pods/SwiftGen/templates/xcassets/swift5.stencil +274 -0
  108. data/spec/Test/Pods/SwiftGen/templates/yaml/inline-swift4.stencil +92 -0
  109. data/spec/Test/Pods/SwiftGen/templates/yaml/inline-swift5.stencil +92 -0
  110. data/spec/Test/Test.xcodeproj/project.pbxproj +406 -0
  111. data/spec/Test/Test.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  112. data/spec/Test/Test.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  113. data/spec/Test/Test.xcworkspace/contents.xcworkspacedata +10 -0
  114. data/spec/Test/Test.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  115. data/spec/Test/Test/AppDelegate.swift +36 -0
  116. data/spec/Test/Test/Assets.xcassets/AccentColor.colorset/Contents.json +11 -0
  117. data/spec/Test/Test/Assets.xcassets/AppIcon.appiconset/Contents.json +98 -0
  118. data/spec/Test/Test/Assets.xcassets/Contents.json +6 -0
  119. data/spec/Test/Test/ContentView.swift +21 -0
  120. data/spec/Test/Test/Info.plist +62 -0
  121. data/spec/Test/Test/SceneDelegate.swift +63 -0
  122. data/spec/Test/Test/all_target_main_language.yml +1 -0
  123. data/spec/Test/Test/en.lproj/LaunchScreen.storyboard +25 -0
  124. data/spec/Test/Test/en.lproj/localizable.strings +3 -0
  125. data/spec/Test/Test/fr.lproj/LaunchScreen.storyboard +25 -0
  126. data/spec/Test/Test/fr.lproj/localizable.strings +3 -0
  127. data/spec/localizationofficer_spec.rb +116 -0
  128. data/spec/spec_helper.rb +67 -0
  129. data/spec/support/fixtures/all_target_main_language.yml +1 -0
  130. data/spec/support/fixtures/resources/TEST/en.lproj/Localizable.strings +8 -0
  131. data/spec/support/fixtures/resources/TEST/en.lproj/Localizable.stringsdict +30 -0
  132. data/spec/support/fixtures/resources/TEST_KO/en.lproj/Localizable.strings +11 -0
  133. data/spec/support/fixtures/resources/TEST_KO/en.lproj/Localizable.stringsdict +30 -0
  134. data/spec/support/fixtures/resources/TEST_KO/fr.lproj/Localizable.strings +11 -0
  135. data/spec/support/fixtures/resources/TEST_KO/fr.lproj/Localizable.stringsdict +30 -0
  136. metadata +491 -0
@@ -0,0 +1,36 @@
1
+ {% if tables.count > 0 %}
2
+ {% macro parametersBlock types %}{% filter removeNewlines:"leading" %}
3
+ {% for type in types %}
4
+ "{{type}}"
5
+ {{ ", " if not forloop.last }}
6
+ {% endfor %}
7
+ {% endfilter %}{% endmacro %}
8
+ {
9
+ {% macro recursiveBlock table item %}
10
+ {% for string in item.strings %}
11
+ {% if string.types %}
12
+ "{{string.key}}": [{% call parametersBlock string.types %}],
13
+ {% else %}
14
+ "{{string.key}}": [],
15
+ {% endif %}
16
+ {% endfor %}
17
+ {% for child in item.children %}
18
+ {% call recursiveBlock table child %}
19
+ {% endfor %}
20
+ {% endmacro %}
21
+ {% set enumName %}{{param.enumName|default:"L10n"}}{% endset %}
22
+ "{{enumName}}": {
23
+ {% if tables.count > 1 or param.forceFileNameEnum %}
24
+ {% for table in tables %}
25
+ "{{table.name}}": {
26
+ {% filter indent:2 %}{% call recursiveBlock table.name table.levels %}{% endfilter %}
27
+ }
28
+ {% endfor %}
29
+ {% else %}
30
+ {% call recursiveBlock tables.first.name tables.first.levels %}
31
+ {% endif %}
32
+ },
33
+ }
34
+ {% else %}
35
+ // No string found
36
+ {% endif %}
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'localizationlinter/gem_version'
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'localizationlinter/plugin'
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Localizationlinter
4
+ VERSION = '0.0.2'
5
+ end
@@ -0,0 +1,96 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative '../../ext/localizationlinter/localizationlinter'
4
+
5
+ module Danger
6
+ # Verify consistency over your project localizable files (localizable.strings and Localizable.stringdict)
7
+ # It uses Swiftgen to generate a localizables output per target and language and compare the output with
8
+ # a reference language one.
9
+ # The comparison ensure:
10
+ # - missing keys
11
+ # - additional keys
12
+ # - wrong parameters in string format
13
+ #
14
+ # @example Verify my project localizables consistency
15
+ #
16
+ # localizationlinter.lint
17
+ #
18
+ # @see https://github.com/fabernovel/danger-localizationlinter
19
+ # @tags iOS, Localization
20
+ #
21
+ class DangerLocalizationlinter < Plugin
22
+ # Keep or clean derived data after execution
23
+ # @return [void]
24
+ attr_accessor :clean_after_execution
25
+
26
+ # Print inline or as markdown
27
+ # @return [void]
28
+ attr_accessor :inline_mode
29
+
30
+ # Print execution logs
31
+ # @return [void]
32
+ attr_accessor :verbose
33
+
34
+ # Path to language configuration yml, defining main language per target
35
+ # example:
36
+ #
37
+ # My_target: en
38
+ # My_other_target: fr
39
+ #
40
+ # default value is Configuration/Defaults/all_target_main_language.yml
41
+ # @return [void]
42
+ attr_accessor :language_configuration_path
43
+
44
+ # Path to swift gen, default value is Pods/SwiftGen/bin/swiftgen
45
+ # @return [void]
46
+ attr_accessor :swift_gen_path
47
+
48
+ # Path to derived data, default value is localization_linter_derived_data
49
+ # @return [void]
50
+ attr_accessor :derived_data_path
51
+
52
+ # Path to derived data, default value is Resources
53
+ # @return [void]
54
+ attr_accessor :resource_path
55
+
56
+ # Path to xcode project, default is taking the first project in root folder
57
+ # @return [void]
58
+ attr_accessor :project_path
59
+
60
+ # Verify the localizable files integrity over the project
61
+ # @return [void]
62
+ # rubocop:disable Metrics/MethodLength
63
+ def lint
64
+ differences = linter.find_differences
65
+ if inline_mode
66
+ differences.each do |issue|
67
+ warn(
68
+ issue[:message],
69
+ file: issue[:filename],
70
+ line: issue[:line]
71
+ )
72
+ end
73
+ elsif !differences.empty?
74
+ message = differences.map do |difference|
75
+ "#{difference[:filename]}:#{difference[:line]} #{difference[:message]}"
76
+ end
77
+ markdown "Localization Linter errors:\n#{message.join("\n")}"
78
+ end
79
+ end
80
+ # rubocop:enable Metrics/MethodLength
81
+
82
+ # Returns the object in charge of verification
83
+ # @return [LocalizationLinter]
84
+ def linter
85
+ LocalizationLinter.new(
86
+ @verbose,
87
+ @clean_after_execution,
88
+ @language_configuration_path,
89
+ @swift_gen_path,
90
+ @derived_data_path,
91
+ @resource_path,
92
+ @project_path
93
+ )
94
+ end
95
+ end
96
+ end
data/spec/Test/Podfile ADDED
@@ -0,0 +1,6 @@
1
+ source 'https://github.com/CocoaPods/Specs.git'
2
+ use_frameworks!
3
+ pod 'SwiftGen', '~> 6.4'
4
+
5
+ target 'Test' do
6
+ end
@@ -0,0 +1,16 @@
1
+ PODS:
2
+ - SwiftGen (6.4.0)
3
+
4
+ DEPENDENCIES:
5
+ - SwiftGen (~> 6.4)
6
+
7
+ SPEC REPOS:
8
+ https://github.com/CocoaPods/Specs.git:
9
+ - SwiftGen
10
+
11
+ SPEC CHECKSUMS:
12
+ SwiftGen: 67860cc7c3cfc2ed25b9b74cfd55495fc89f9108
13
+
14
+ PODFILE CHECKSUM: e8592eceb63e0c87e87cd538ba5eea9bb65dcf2f
15
+
16
+ COCOAPODS: 1.10.0
@@ -0,0 +1,1357 @@
1
+ # SwiftGen CHANGELOG
2
+
3
+ ---
4
+
5
+ ## 6.4.0
6
+
7
+ ### New Features
8
+
9
+ * 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 used `Bundle` using the `bundle` or `lookupFunction` template parameters.
10
+ [Arnaud Dorgans](https://github.com/arnauddorgans)
11
+ [#763](https://github.com/SwiftGen/SwiftGen/pull/763)
12
+ * Added `config generate-xcfilelist` subcommand to generate input and output `xcfilelist`s based on your configuration file. These files should then be used in an Xcode build step that executes `swiftgen config run`. Don't forget to regenerate the file lists after adding/removing resources in your project in a way that might impact them.
13
+ [@CraigSiemens](https://github.com/CraigSiemens)
14
+ [#441](https://github.com/SwiftGen/SwiftGen/issues/441)
15
+ * Colors: the XML parser now accepts a `colorFormat` option, used to change the color format. The default format is `rgba`.
16
+ [@kevinstier](https://github.com/kevinstier)
17
+ [#562](https://github.com/SwiftGen/SwiftGen/issues/562)
18
+ [#768](https://github.com/SwiftGen/SwiftGen/pull/768)
19
+ * 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.
20
+ [@matsune](https://github.com/matsune)
21
+ [David Jennes](https://github.com/djbe)
22
+ [#778](https://github.com/SwiftGen/SwiftGen/pull/778)
23
+
24
+ ### Bug Fixes
25
+
26
+ * Plist: Update the parsing strategy (using `Codable`) to fix parsing of `Bool` values as `Integer` in some cases.
27
+ [@fortmarek](https://github.com/fortmarek)
28
+ [Olivier Halligon](https://github.com/AliSoftware)
29
+ [#779](https://github.com/SwiftGen/SwiftGen/pull/779)
30
+ * JSON/Plist/YAML: fixed issue with `inline` templates which incorrectly generated `1`/`0` as values, instead of `true`/`false` as expected.
31
+ [David Jennes](https://github.com/djbe)
32
+ [#779](https://github.com/SwiftGen/SwiftGen/pull/779)
33
+ [#783](https://github.com/SwiftGen/SwiftGen/pull/783)
34
+ * JSON: the parser now correctly recognizes `0` and `1` as `Int` (instead of `Bool`).
35
+ [David Jennes](https://github.com/djbe)
36
+ [#786](https://github.com/SwiftGen/SwiftGen/pull/786)
37
+
38
+ ### Internal Changes
39
+
40
+ * Update the Swift version in `.swift-version` so that the right version is used when building manually (using `swiftenv`).
41
+ [@cfiken](https://github.com/cfiken)
42
+ [#764](https://github.com/SwiftGen/SwiftGen/issues/764)
43
+ * Update Yams from `3.0.0` to `4.0.0`.
44
+ [@hungrxyz](https://github.com/hungrxyz)
45
+ [#772](https://github.com/SwiftGen/SwiftGen/issues/772)
46
+ * Updated Pods and Gems dependencies, and Xcode 12.
47
+ [David Jennes](https://github.com/djbe)
48
+ [#782](https://github.com/SwiftGen/SwiftGen/pull/782)
49
+
50
+ ## 6.3.0
51
+
52
+ ### Deprecations
53
+
54
+ * Fonts: the generated `Font` typealias (to `UIFont`/`NSFont`) is deprecated and will be removed in the next major release.
55
+ [David Jennes](https://github.com/djbe)
56
+ [#728](https://github.com/SwiftGen/SwiftGen/pull/728)
57
+
58
+ ### New Features
59
+
60
+ * Strings: support for plurals declared in `.stringsdict` files.
61
+ [Florian Fittschen](https://github.com/ffittschen)
62
+ [#184](https://github.com/SwiftGen/SwiftGen/issues/184)
63
+ [#634](https://github.com/SwiftGen/SwiftGen/pull/634)
64
+ * 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.
65
+ [David Jennes](https://github.com/djbe)
66
+ [#728](https://github.com/SwiftGen/SwiftGen/pull/728)
67
+ * 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.
68
+ [David Jennes](https://github.com/djbe)
69
+ [#647](https://github.com/SwiftGen/SwiftGen/issues/647)
70
+ [#728](https://github.com/SwiftGen/SwiftGen/pull/728)
71
+ * CoreData: Deprecates `fetchRequest()` and adds `makeFetchRequest()` to avoid ambiguous function usage.
72
+ [David Rothera](https://github.com/davidrothera)
73
+ [#726](https://github.com/SwiftGen/SwiftGen/pull/726)
74
+ * 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.
75
+ [David Jennes](https://github.com/djbe)
76
+ [#648](https://github.com/SwiftGen/SwiftGen/issues/648)
77
+ [#733](https://github.com/SwiftGen/SwiftGen/pull/733)
78
+ * 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](Documentation/templates/) for more information. For an in-depth explanation, also check the [customize loading of resources](Documentation/Articles/Customize-loading-of-resources.md) article.
79
+ [David Jennes](https://github.com/djbe)
80
+ [#737](https://github.com/SwiftGen/SwiftGen/pull/737)
81
+ * 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](Documentation/templates/) for more information. For an in-depth explanation, also check the [customize loading of resources](Documentation/Articles/Customize-loading-of-resources.md) article.
82
+ [David Jennes](https://github.com/djbe)
83
+ [#738](https://github.com/SwiftGen/SwiftGen/pull/738)
84
+
85
+ ### Bug Fixes
86
+
87
+ * Strings: fix incorrect interpretation of format placeholders when there were missing positional parameters (e.g. `"%2$@"` without a `%1$…` defined).
88
+ [Olivier Halligon](https://github.com/AliSoftware)
89
+ [#634](https://github.com/SwiftGen/SwiftGen/pull/634)
90
+
91
+ ## 6.2.1
92
+
93
+ There are no major changes in this release, although JSON & Plist template writers may want to read the [small migration guide](Documentation/SwiftGenKit%20Contexts/MigrationGuide.md##swiftgen-621-migration-guide) to prepare for upcoming context changes.
94
+
95
+ ### Deprecations
96
+
97
+ * 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.
98
+ [David Jennes](https://github.com/djbe)
99
+ [#702](https://github.com/SwiftGen/SwiftGen/pull/702)
100
+ [#732](https://github.com/SwiftGen/SwiftGen/pull/732)
101
+
102
+ ### Bug Fixes
103
+
104
+ * Prevent generating `default.profraw` (code coverage) files.
105
+ [David Jennes](https://github.com/djbe)
106
+ [#722](https://github.com/SwiftGen/SwiftGen/pull/722)
107
+ * JSON/Plist/YAML: Fix issue with homogeneous `Array`s in the Inline templates (such as `[String`]).
108
+ [#687](https://github.com/SwiftGen/SwiftGen/pull/687)
109
+ [@fjtrujy](https://github.com/fjtrujy)
110
+ * Avoid breaking the system swift installation when installing SwiftGen via Homebrew on macOS 10.14.4 or higher.
111
+ [David Jennes](https://github.com/djbe)
112
+ [#686](https://github.com/SwiftGen/SwiftGen/issues/686)
113
+ [#730](https://github.com/SwiftGen/SwiftGen/pull/730)
114
+
115
+ ### Internal Changes
116
+
117
+ * Parsers are now executed in parallel, making SwiftGen faster when multiple parsers are used. Note: only applies when using a configuration file.
118
+ [Marcelo Fabri](https://github.com/marcelofabri)
119
+ [#699](https://github.com/SwiftGen/SwiftGen/issues/699)
120
+ * Use `JSONSerialization` instead of `Yams` for parsing JSONs, making the `json` parser faster.
121
+ [Marcelo Fabri](https://github.com/marcelofabri)
122
+ [#698](https://github.com/SwiftGen/SwiftGen/issues/698)
123
+ * JSON/Plist/YAML: Lazily evaluate `metadata` of documents, making SwiftGen faster if the `metadata` field is never used in a template.
124
+ [Marcelo Fabri](https://github.com/marcelofabri)
125
+ [#700](https://github.com/SwiftGen/SwiftGen/issues/700)
126
+
127
+ ## 6.2.0
128
+
129
+ ⚠️ 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.
130
+
131
+ Read the [SwiftGen 6.2 Migration Guide](Documentation/MigrationGuide.md#migrating-to-swiftgen-62) for a list of changes you'll need to apply.
132
+
133
+ ### Breaking Changes
134
+
135
+ * 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.
136
+ [David Jennes](https://github.com/djbe)
137
+ [#601](https://github.com/SwiftGen/SwiftGen/pull/601)
138
+ [#691](https://github.com/SwiftGen/SwiftGen/pull/691)
139
+
140
+ ### Deprecations
141
+
142
+ * XCAssets: the `colorAliasName` and `imageAliasName` template parameters are now deprecated and will be removed in the next major release.
143
+ [David Jennes](https://github.com/djbe)
144
+ [#614](https://github.com/SwiftGen/SwiftGen/pull/614)
145
+ * 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.
146
+ [Olivier Halligon](https://github.com/AliSoftware)
147
+ [#705](https://github.com/SwiftGen/SwiftGen/pull/705)
148
+ * 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.
149
+ [Olivier Halligon](https://github.com/AliSoftware)
150
+ [#697](https://github.com/SwiftGen/SwiftGen/pull/697)
151
+ * 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.
152
+ [Olivier Halligon](https://github.com/AliSoftware)
153
+ [#717](https://github.com/SwiftGen/SwiftGen/pull/717)
154
+
155
+ ### New Features
156
+
157
+ * 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.
158
+ [Olivier Halligon](https://github.com/AliSoftware)
159
+ [#705](https://github.com/SwiftGen/SwiftGen/pull/705)
160
+ * 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)_.
161
+ [Olivier Halligon](https://github.com/AliSoftware)
162
+ [#694](https://github.com/SwiftGen/SwiftGen/pull/694)
163
+ * 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.
164
+ [Olivier Halligon](https://github.com/AliSoftware)
165
+ [#697](https://github.com/SwiftGen/SwiftGen/pull/697)
166
+ * 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.
167
+ [David Jennes](https://github.com/djbe)
168
+ [#587](https://github.com/SwiftGen/SwiftGen/pull/587)
169
+ [#597](https://github.com/SwiftGen/SwiftGen/pull/597)
170
+ * 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).
171
+ [David Jennes](https://github.com/djbe)
172
+ [#576](https://github.com/SwiftGen/SwiftGen/issues/576)
173
+ [#588](https://github.com/SwiftGen/SwiftGen/pull/588)
174
+ * 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).
175
+ [David Jennes](https://github.com/djbe)
176
+ [#591](https://github.com/SwiftGen/SwiftGen/issues/591)
177
+ [#592](https://github.com/SwiftGen/SwiftGen/pull/592)
178
+ * 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).
179
+ [David Jennes](https://github.com/djbe)
180
+ [#566](https://github.com/SwiftGen/SwiftGen/issues/566)
181
+ [#609](https://github.com/SwiftGen/SwiftGen/issues/609)
182
+ [#593](https://github.com/SwiftGen/SwiftGen/pull/593)
183
+ [#610](https://github.com/SwiftGen/SwiftGen/pull/610)
184
+ * 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.
185
+ [Steven Magdy](https://github.com/StevenMagdy)
186
+ [426](https://github.com/SwiftGen/SwiftGen/issues/426)
187
+ [468](https://github.com/SwiftGen/SwiftGen/issues/468)
188
+ [573](https://github.com/SwiftGen/SwiftGen/pull/573)
189
+ [716](https://github.com/SwiftGen/SwiftGen/pull/716)
190
+ * Strings: templates to generate Objective-C. Please check [the template's documentation](Documentation/templates/strings/objc.md) for more information.
191
+ [Eric Slosser](https://github.com/Mr-Fixit)
192
+ [SwiftGen/SwiftGen#378](https://github.com/SwiftGen/SwiftGen/pull/378)
193
+ * XCAssets: the parser now supports AR Resource Groups, together with reference images and objects.
194
+ [David Jennes](https://github.com/djbe)
195
+ [#614](https://github.com/SwiftGen/SwiftGen/pull/614)
196
+ * Templates: Bundle now use static property on BundleToken for better performance.
197
+ [shuoli84](https://github.com/shuoli84)
198
+ [#623](https://github.com/SwiftGen/SwiftGen/issues/623)
199
+ * All parsers now have built-in Swift 5 templates.
200
+ [David Jennes](https://github.com/djbe)
201
+ [#595](https://github.com/SwiftGen/SwiftGen/issues/595)
202
+ [#600](https://github.com/SwiftGen/SwiftGen/pull/600)
203
+ * 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.
204
+ [Viktoras Laukevičius](https://github.com/viktorasl)
205
+ [#669](https://github.com/SwiftGen/SwiftGen/issues/669)
206
+ [Olivier Halligon](https://github.com/AliSoftware)
207
+ [#693](https://github.com/SwiftGen/SwiftGen/pull/693)
208
+
209
+ ### Bug Fixes
210
+
211
+ * SwiftGen now properly shows a better help message and the command usage when running an incomplete command, instead of complaining about a config file.
212
+ [Olivier Halligon](https://github.com/AliSoftware)
213
+ [#706](https://github.com/SwiftGen/SwiftGen/pull/706)
214
+ * XCAssets: improved the performance for color assets by caching the resolved colors.
215
+ [David Jennes](https://github.com/djbe)
216
+ [#578](https://github.com/SwiftGen/SwiftGen/issues/578)
217
+ [#589](https://github.com/SwiftGen/SwiftGen/pull/589)
218
+ * Core Data: `entityName` is now correctly a `class var` instead of a `class func`.
219
+ [David Jennes](https://github.com/djbe)
220
+ [#590](https://github.com/SwiftGen/SwiftGen/pull/590)
221
+ * Strings: we now correctly generate the type `Any` (instead of `String`) for `%@` placeholders.
222
+ [David Jennes](https://github.com/djbe)
223
+ [620](https://github.com/SwiftGen/SwiftGen/issues/620)
224
+ * Colors: Reduce initializer type inference for improved compilation performance.
225
+ [Markus Faßbender](https://github.com/dermaaarkus)
226
+ [#663](https://github.com/SwiftGen/SwiftGen/issues/663)
227
+ * Config Lint: fix config lint not processing relative paths containing ".." correctly.
228
+ [Wolfgang Lutz](https://github.com/Lutzifer)
229
+ [#688](https://github.com/SwiftGen/SwiftGen/issues/688)
230
+ * Core Data: the generated code was missing `,` (comma) for fetch requests with multiple arguments.
231
+ [David Jennes](https://github.com/djbe)
232
+ [#692](https://github.com/SwiftGen/SwiftGen/pull/692)
233
+ * Colors: Fix compile time warning when long expression type checking is enabled.
234
+ [Ryan Mason-Davies](https://github.com/iotize)
235
+ [#704](https://github.com/SwiftGen/SwiftGen/issues/704)
236
+ [#710](https://github.com/SwiftGen/SwiftGen/pull/710)
237
+
238
+ ### Internal Changes
239
+
240
+ * 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.
241
+ [Olivier Halligon](https://github.com/AliSoftware)
242
+ [#714](https://github.com/SwiftGen/SwiftGen/pull/714)
243
+ * Documentation: Improved doc for creating custom templates, and added a Documentation Table of Contents.
244
+ [Olivier Halligon](https://github.com/AliSoftware)
245
+ [#713](https://github.com/SwiftGen/SwiftGen/pull/713)
246
+ * Refactoring: Reduce globals & rearrange CLI code.
247
+ [Olivier Halligon](https://github.com/AliSoftware)
248
+ [#586](https://github.com/SwiftGen/SwiftGen/pull/586)
249
+ * Moved generated test output files into subdirectories per template.
250
+ [David Jennes](https://github.com/djbe)
251
+ [#598](https://github.com/SwiftGen/SwiftGen/pull/598)
252
+ * Compile generated output using configuration files for easier management.
253
+ [David Jennes](https://github.com/djbe)
254
+ [#365](https://github.com/SwiftGen/SwiftGen/issues/365)
255
+ [#599](https://github.com/SwiftGen/SwiftGen/pull/599)
256
+ * XCAssets: renamed the catalogs we use for sample code & testing to avoid some confusion.
257
+ [David Jennes](https://github.com/djbe)
258
+ [#613](https://github.com/SwiftGen/SwiftGen/pull/613)
259
+ * Update SwiftLint and enable some extra SwiftLint rules.
260
+ [David Jennes](https://github.com/djbe)
261
+ [#617](https://github.com/SwiftGen/SwiftGen/pull/617)
262
+ * Some CI fixes related to software versions.
263
+ [Patrick Nollet](https://github.com/PatrickNLT)
264
+ [#645](https://github.com/SwiftGen/SwiftGen/pull/645)
265
+ * Updated to CocoaPods 1.9.0.
266
+ [David Jennes](https://github.com/djbe)
267
+ [#619](https://github.com/SwiftGen/SwiftGen/pull/619)
268
+ * Updated Pods and Gems dependencies.
269
+ [David Jennes](https://github.com/djbe)
270
+ [#684](https://github.com/SwiftGen/SwiftGen/pull/684)
271
+
272
+ ## 6.1.0
273
+
274
+ ### Changes in core dependencies of SwiftGen
275
+
276
+ * [StencilSwiftKit 2.7.2](https://github.com/SwiftGen/StencilSwiftKit/blob/2.7.2/CHANGELOG.md)
277
+ * [Stencil 0.13.1](https://github.com/kylef/Stencil/blob/0.13.1/CHANGELOG.md)
278
+
279
+ ### New Features
280
+
281
+ * Adds support for generating code from Core Data models.
282
+ [Grant Butler](https://github.com/grantjbutler)
283
+ [David Jennes](https://github.com/djbe)
284
+ [Igor Palaguta](https://github.com/Igor-Palaguta)
285
+ [#455](https://github.com/SwiftGen/SwiftGen/pull/455)
286
+ [#567](https://github.com/SwiftGen/SwiftGen/pull/567)
287
+ [#575](https://github.com/SwiftGen/SwiftGen/pull/575)
288
+ [#581](https://github.com/SwiftGen/SwiftGen/pull/581)
289
+ [#45](https://github.com/SwiftGen/SwiftGen/issues/45)
290
+ [#185](https://github.com/SwiftGen/SwiftGen/issues/185)
291
+ [#191](https://github.com/SwiftGen/SwiftGen/pull/191)
292
+ [#195](https://github.com/SwiftGen/SwiftGen/pull/195)
293
+ * Config: expand environment variables in YAML files.
294
+ [Wolfgang Lutz](https://github.com/lutzifer)
295
+ [#355](https://github.com/SwiftGen/SwiftGen/issues/355)
296
+ [#564](https://github.com/SwiftGen/SwiftGen/pull/564)
297
+ * Each parser 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 parser recurses into directories.
298
+ [David Jennes](https://github.com/djbe)
299
+ [#383](https://github.com/SwiftGen/SwiftGen/issues/383)
300
+ [#570](https://github.com/SwiftGen/SwiftGen/pull/570)
301
+
302
+ ### Bug Fixes
303
+
304
+ * 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.
305
+ [Isaac Halvorson](https://github.com/hisaac)
306
+ [#549](https://github.com/SwiftGen/SwiftGen/pull/549)
307
+
308
+ ### Internal Changes
309
+
310
+ * Resolve path if the binary is a symbolic link in order to find bundled templates.
311
+ [Liquidsoul](https://github.com/liquidsoul)
312
+ [#559](https://github.com/SwiftGen/SwiftGen/issues/559)
313
+ * Update to SwiftLint 0.30.1 and enable some extra SwiftLint rules.
314
+ [David Jennes](https://github.com/djbe)
315
+ [#574](https://github.com/SwiftGen/SwiftGen/pull/574)
316
+ [#583](https://github.com/SwiftGen/SwiftGen/pull/583)
317
+
318
+ ## 6.0.2
319
+
320
+ ### Changes in core dependencies of SwiftGen
321
+
322
+ * [StencilSwiftKit 2.7.1](https://github.com/SwiftGen/StencilSwiftKit/blob/2.7.1/CHANGELOG.md)
323
+ * [Stencil 0.13.1](https://github.com/kylef/Stencil/blob/0.13.1/CHANGELOG.md)
324
+
325
+ ### Bug Fixes
326
+
327
+ * Strings: rolled back the changes in #503, to ensure `%%` is correctly unescaped.
328
+ [David Jennes](https://github.com/djbe)
329
+ [#542](https://github.com/SwiftGen/SwiftGen/pull/542)
330
+ * Strings: generate the correct types for `%c` and `%p`.
331
+ [David Jennes](https://github.com/djbe)
332
+ [#543](https://github.com/SwiftGen/SwiftGen/pull/543)
333
+ * SPM/Mint: SwiftGen now provides correct version information, instead of "0.0".
334
+ [David Jennes](https://github.com/djbe)
335
+ [#544](https://github.com/SwiftGen/SwiftGen/pull/544)
336
+
337
+ ## 6.0.1
338
+
339
+ ### Changes in core dependencies of SwiftGen
340
+
341
+ * [StencilSwiftKit 2.7.1](https://github.com/SwiftGen/StencilSwiftKit/blob/2.7.1/CHANGELOG.md)
342
+ * [Stencil 0.13.1](https://github.com/kylef/Stencil/blob/0.13.1/CHANGELOG.md)
343
+
344
+ ### Bug Fixes
345
+
346
+ * IB: Fix missing `import AppKit`/`import UIKit` in some rare cases.
347
+ [David Jennes](https://github.com/djbe)
348
+ [#515](https://github.com/SwiftGen/SwiftGen/issues/515)
349
+ [#519](https://github.com/SwiftGen/SwiftGen/pull/519)
350
+ * IB: Fix issue with segues-swift4 template when compiled with Swift 4.2 on macOS.
351
+ [Olivier Halligon](https://github.com/AliSoftware)
352
+ [#515](https://github.com/SwiftGen/SwiftGen/issues/515)
353
+ [#518](https://github.com/SwiftGen/SwiftGen/pull/518)
354
+ * SPM/Mint: Update the Stencil version to 0.13.1.
355
+ [David Jennes](https://github.com/djbe)
356
+ [#527](https://github.com/SwiftGen/SwiftGen/pull/527)
357
+ * Ensure the `templates` subcommand properly works with the deprecated `storyboards` subcommand.
358
+ [David Jennes](https://github.com/djbe)
359
+ [#525](https://github.com/SwiftGen/SwiftGen/issues/525)
360
+ [#530](https://github.com/SwiftGen/SwiftGen/pull/530)
361
+ * Ensure configuration file errors show as red in Xcode.
362
+ [Olivier Halligon](https://github.com/AliSoftware)
363
+ [#516](https://github.com/SwiftGen/SwiftGen/issues/516)
364
+ [#533](https://github.com/SwiftGen/SwiftGen/pull/533)
365
+ * Strings: Ensure the parser correctly handles keys ending with a `.` and empty key components.
366
+ [David Jennes](https://github.com/djbe)
367
+ [#528](https://github.com/SwiftGen/SwiftGen/issues/528)
368
+ [#531](https://github.com/SwiftGen/SwiftGen/pull/531)
369
+
370
+ ### Internal Changes
371
+
372
+ * Integrated Danger to help on contributions by giving automatic feedback.
373
+ [Olivier Halligon](https://github.com/AliSoftware)
374
+ [#520](https://github.com/SwiftGen/SwiftGen/issues/520)
375
+ [#524](https://github.com/SwiftGen/SwiftGen/issues/524)
376
+
377
+ ## 6.0.0
378
+
379
+ ⚠️ 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.
380
+
381
+ Read the [SwiftGen 6.0 Migration Guide](Documentation/MigrationGuide.md#migrating-to-swiftgen-60) for a list of changes you'll need to apply.
382
+
383
+ ### Changes in core dependencies of SwiftGen
384
+
385
+ * [StencilSwiftKit 2.7.0](https://github.com/SwiftGen/StencilSwiftKit/blob/2.7.0/CHANGELOG.md)
386
+ * [Stencil 0.13.1](https://github.com/kylef/Stencil/blob/0.13.1/CHANGELOG.md)
387
+
388
+ ### Breaking Changes
389
+
390
+ * 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.
391
+ [Diego Chohfi](https://github.com/dchohfi)
392
+ [#257](https://github.com/SwiftGen/SwiftGen/issues/257)
393
+ * Remove Swift 2 support.
394
+ [David Jennes](https://github.com/djbe)
395
+ [#420](https://github.com/SwiftGen/SwiftGen/pull/420)
396
+ * 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.
397
+ [David Jennes](https://github.com/djbe)
398
+ [#423](https://github.com/SwiftGen/SwiftGen/pull/423)
399
+ * XCAssets: the generated templates won't namespace groups by default anymore, use the `forceProvidesNamespaces` flag to enable this behaviour again.
400
+ [jechris](https://github.com/pjechris)
401
+ [#453](https://github.com/SwiftGen/SwiftGen/issues/453)
402
+ * 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).
403
+ [David Jennes](https://github.com/djbe)
404
+ [#480](https://github.com/SwiftGen/SwiftGen/pull/480)
405
+ * 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.
406
+ [David Jennes](https://github.com/djbe)
407
+ [#482](https://github.com/SwiftGen/SwiftGen/pull/482)
408
+ * Interface Builder: split up the storyboards template into 2 parts, one for scenes and one for segues.
409
+ [David Jennes](https://github.com/djbe)
410
+ [#419](https://github.com/SwiftGen/SwiftGen/pull/419)
411
+
412
+ ### New Features
413
+
414
+ * Add ability to list all custom fonts and register them using `FontFamily.registerAllCustomFonts`.
415
+ [Olivier Halligon](https://github.com/AliSoftware)
416
+ [#394](https://github.com/SwiftGen/SwiftGen/issues/394)
417
+ * Add support for Swift Package Manager and Mint.
418
+ [Yonas Kolb](https://github.com/yonaskolb)
419
+ [#411](https://github.com/SwiftGen/SwiftGen/pull/411)
420
+ * The `swiftgen.yml` config file now accepts multiple outputs for each parser, 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.
421
+ [David Jennes](https://github.com/djbe)
422
+ [#424](https://github.com/SwiftGen/SwiftGen/pull/424)
423
+ [#510](https://github.com/SwiftGen/SwiftGen/pull/510)
424
+ * Use `swiftlint:disable all` in generated files to avoid interference with SwiftLint rules custom to the host project.
425
+ [Frederick Pietschmann](https://github.com/fredpi)
426
+ [David Jennes](https://github.com/djbe)
427
+ [#409](https://github.com/SwiftGen/SwiftGen/issues/409)
428
+ [#506](https://github.com/SwiftGen/SwiftGen/issues/506)
429
+ * XCAssets: Added support for `NSDataAssets`.
430
+ [Oliver Jones](https://github.com/orj)
431
+ [#444](https://github.com/SwiftGen/SwiftGen/issues/444)
432
+ * Organised the generated code in sections for better readability, with all generated constants at the top of the file.
433
+ [David Jennes](https://github.com/djbe)
434
+ [Olivier Halligon](https://github.com/AliSoftware)
435
+ [#456](https://github.com/SwiftGen/SwiftGen/pull/456)
436
+ [#481](https://github.com/SwiftGen/SwiftGen/pull/481)
437
+ * 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 parser have been kept quite similar, for easier switching between file formats.
438
+ [John T McIntosh](https://github.com/johntmcintosh)
439
+ [Toshihiro Suzuki](https://github.com/toshi0383)
440
+ [Peter Livesey](https://github.com/plivesey)
441
+ [David Jennes](https://github.com/djbe)
442
+ [#379](https://github.com/SwiftGen/SwiftGen/pull/379)
443
+ [#359](https://github.com/SwiftGen/SwiftGen/issues/359)
444
+ [#288](https://github.com/SwiftGen/SwiftGen/pull/288)
445
+ [#188](https://github.com/SwiftGen/SwiftGen/pull/188)
446
+ [#493](https://github.com/SwiftGen/SwiftGen/pull/493)
447
+ [#504](https://github.com/SwiftGen/SwiftGen/pull/504)
448
+ * Updated the playgrounds with the new `json`, `plist` and `yaml` parsers, and updated the other pages to reflect the template changes.
449
+ [David Jennes](https://github.com/djbe)
450
+ [#495](https://github.com/SwiftGen/SwiftGen/pull/495)
451
+ * 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.
452
+ [David Jennes](https://github.com/djbe)
453
+ [#509](https://github.com/SwiftGen/SwiftGen/pull/509)
454
+
455
+ ### Bug Fixes
456
+
457
+ * Fix memory leak in generated code for Fonts.
458
+ [Olivier Halligon](https://github.com/AliSoftware)
459
+ [#394](https://github.com/SwiftGen/SwiftGen/issues/394)
460
+ * Interface Builder: ensure the templates handle `GLKViewController`, `AVPlayerViewController` and `NSPageController` correctly.
461
+ [David Jennes](https://github.com/djbe)
462
+ [#404](https://github.com/SwiftGen/SwiftGen/issues/404)
463
+ [#414](https://github.com/SwiftGen/SwiftGen/pull/414)
464
+ * Interface Builder: ensure the parser can handle files with and without "trait variations".
465
+ [David Jennes](https://github.com/djbe)
466
+ [#367](https://github.com/SwiftGen/SwiftGen/issues/367)
467
+ [#429](https://github.com/SwiftGen/SwiftGen/pull/429)
468
+ * Restrict `SceneType` and `InitialSceneType` to UIViewController when not targeting AppKit. When targeting AppKit, remove superfluous `Any`.
469
+ [Darron Schall](https://github.com/darronschall)
470
+ [#463](https://github.com/SwiftGen/SwiftGen/issues/463)
471
+ [#464](https://github.com/SwiftGen/SwiftGen/pull/464)
472
+ * Fonts: disable a warning in generated font files for projects with `conditional_returns_on_newlines` SwiftLint rule enabled.
473
+ [Ryan Davies](https://github.com/iotize)
474
+ [#436](https://github.com/SwiftGen/SwiftGen/issues/436)
475
+ [#465](https://github.com/SwiftGen/SwiftGen/pull/465)
476
+ * Interface Builder: the parser and templates now handle the "Inherit module from target" setting.
477
+ [David Jennes](https://github.com/djbe)
478
+ [#435](https://github.com/SwiftGen/SwiftGen/issues/435)
479
+ [#485](https://github.com/SwiftGen/SwiftGen/pull/485)
480
+ * Strings: the parser now correctly handles formats such as `% d` and `%#x`.
481
+ [David Jennes](https://github.com/djbe)
482
+ [#502](https://github.com/SwiftGen/SwiftGen/pull/502)
483
+ * Strings: ensure strings without arguments are not processed using `String(format:)`.
484
+ [David Jennes](https://github.com/djbe)
485
+ [#503](https://github.com/SwiftGen/SwiftGen/pull/503)
486
+
487
+ ### Internal Changes
488
+
489
+ * Migrated to CircleCI 2.0.
490
+ [David Jennes](https://github.com/djbe)
491
+ [#403](https://github.com/SwiftGen/SwiftGen/pull/403)
492
+ * Switched to using SwiftLint via CocoaPods instead of our own install scripts.
493
+ [David Jennes](https://github.com/djbe)
494
+ [#401](https://github.com/SwiftGen/SwiftGen/pull/401)
495
+ * Enabled some extra SwiftLint rules for better code consistency.
496
+ [David Jennes](https://github.com/djbe)
497
+ [#402](https://github.com/SwiftGen/SwiftGen/pull/402)
498
+ [#476](https://github.com/SwiftGen/SwiftGen/pull/476)
499
+ * Updated to latest Xcode (10.0.0) and Swift 4.2.
500
+ [David Jennes](https://github.com/djbe)
501
+ [#415](https://github.com/SwiftGen/SwiftGen/pull/415)
502
+ [#498](https://github.com/SwiftGen/SwiftGen/pull/498)
503
+ * Update to Stencil 0.13.0, and use some of it's new filters in our templates.
504
+ [David Jennes](https://github.com/djbe)
505
+ [#416](https://github.com/SwiftGen/SwiftGen/pull/416)
506
+ [#475](https://github.com/SwiftGen/SwiftGen/pull/475)
507
+ [#498](https://github.com/SwiftGen/SwiftGen/pull/498)
508
+ * Store testing contexts as YAML files instead of PLISTs.
509
+ [David Jennes](https://github.com/djbe)
510
+ [#418](https://github.com/SwiftGen/SwiftGen/pull/418)
511
+ [#461](https://github.com/SwiftGen/SwiftGen/pull/461)
512
+ * Refactor the parsers as they're getting more complex.
513
+ [David Jennes](https://github.com/djbe)
514
+ [#417](https://github.com/SwiftGen/SwiftGen/pull/417)
515
+ [#422](https://github.com/SwiftGen/SwiftGen/pull/422)
516
+ * Disabled a SwiftLint rule for function parameter count.
517
+ [Oleg Gorbatchev](https://github.com/gorbat-o)
518
+ [#428](https://github.com/SwiftGen/SwiftGen/pull/428)
519
+ * Fix missing link in the README.
520
+ [Takeshi Fujiki](https://github.com/takecian)
521
+ [#459](https://github.com/SwiftGen/SwiftGen/issues/459)
522
+
523
+ ## 5.3.0
524
+
525
+ ### Changes in core dependencies of SwiftGen
526
+
527
+ * [StencilSwiftKit 2.4.0](https://github.com/SwiftGen/StencilSwiftKit/blob/2.4.0/CHANGELOG.md)
528
+ * [Stencil 0.10.1](https://github.com/kylef/Stencil/blob/0.10.1/CHANGELOG.md)
529
+
530
+ ### New Features
531
+
532
+ * XCAssets: exposed getter for image name string.
533
+ [Abbey Jackson](https://github.com/abbeyjackson)
534
+ [SwiftGen/templates#85](https://github.com/SwiftGen/templates/pull/85)
535
+ * XCAssets: exposed getter for color name string.
536
+ [Stephan Diederich](https://github.com/diederich)
537
+ [SwiftGen/templates#87](https://github.com/SwiftGen/templates/pull/87)
538
+ * Allows to set all properties as `public` by using `--param publicAccess` on all templates.
539
+ [Olivier Halligon](https://github.com/AliSoftware)
540
+ [SwiftGen/templates#84](https://github.com/SwiftGen/templates/pull/84)
541
+ [Txai Wieser](https://github.com/txaiwieser)
542
+ [SwiftGen/templates#81](https://github.com/SwiftGen/templates/pull/81)
543
+
544
+ ### Internal Changes
545
+
546
+ * Merged the `SwiftGenKit` and `templates` repositories back into this repository for easier development and maintenance.
547
+ [David Jennes](https://github.com/djbe)
548
+ [#356](https://github.com/SwiftGen/SwiftGen/pull/356)
549
+
550
+ ## 5.2.1
551
+
552
+ ### Bug Fixes
553
+
554
+ * Fix SwiftGen no longer working using CLI parameters (instead of config file).
555
+ [David Jennes](https://github.com/djbe)
556
+ [#347](https://github.com/SwiftGen/SwiftGen/pull/347)
557
+ * Errors now properly exit with a non-zero exit code.
558
+ [Olivier Halligon](https://github.com/AliSoftware)
559
+ [#348](https://github.com/SwiftGen/SwiftGen/pull/348)
560
+ * `swiftgen --help` prints the full help back again
561
+ (and not just the help of the default `config run` subcommand).
562
+ [Olivier Halligon](https://github.com/AliSoftware)
563
+ [#349](https://github.com/SwiftGen/SwiftGen/pull/349)
564
+
565
+ ## 5.2.0
566
+
567
+ ### Changes in core dependencies of SwiftGen
568
+
569
+ * [SwiftGenKit 2.1.1](https://github.com/SwiftGen/SwiftGenKit/blob/2.1.1/CHANGELOG.md)
570
+ * [StencilSwiftKit 2.3.0](https://github.com/SwiftGen/StencilSwiftKit/blob/2.3.0/CHANGELOG.md)
571
+ * [templates 2.2.0](https://github.com/SwiftGen/templates/blob/2.2.0/CHANGELOG.md)
572
+
573
+ ### New Features
574
+
575
+ * You can now use a `swiftgen.yml` file to configure SwiftGen! 🎉
576
+ Read more about it [in the dedicated documentation](Documentation/ConfigFile.md).
577
+ [Olivier Halligon](https://github.com/AliSoftware)
578
+ [#337](https://github.com/SwiftGen/SwiftGen/pull/337)
579
+ * Storyboards: Added a new `ignoreTargetModule` parameter if you're using storyboards in multiple targets, to avoid issues with the generated code.
580
+ [Julien Quéré](https://github.com/juli1quere)
581
+ [SwiftGen/templates#36](https://github.com/SwiftGen/templates/pull/36)
582
+
583
+ ### Bug Fixes
584
+
585
+ * Fixes an issue in High Sierra where the output of the processed Catalog Entries was not ordered alphabetically.
586
+ [Yusuke Kuroiwa](https://github.com/wakinchan)
587
+ [Francisco Diaz](https://github.com/fdiaz)
588
+ [SwiftGen/SwiftGenKit#57](https://github.com/SwiftGen/SwiftGenKit/pull/57)
589
+ * Fonts: fix code which checks if a font is already registered.
590
+ [Vladimir Burdukov](https://github.com/chipp)
591
+ [SwiftGen/templates#77](https://github.com/SwiftGen/templates/pull/77)
592
+ * SwiftLint rules: Disabled the `superfluous_disable_command` rule
593
+ for all `swiftlint:disable` exceptions in all templates.
594
+ [Olivier Halligon](https://github.com/AliSoftware)
595
+ [SwiftGen/SwiftGen#334](https://github.com/SwiftGen/SwiftGen/issues/334)
596
+ [SwiftGen/templates#83](https://github.com/SwiftGen/templates/pull/83)
597
+ * When installing SwiftGen via CocoaPods, the unneeded `file.zip` is not kept in `Pods/SwiftGen/` anymore _(freeing ~5MB on each install of SwiftGen made via CocoaPods!)_.
598
+ [Olivier Halligon](https://github.com/AliSoftware)
599
+ [#342](https://github.com/SwiftGen/SwiftGen/pull/342)
600
+
601
+ ## 5.1.2
602
+
603
+ ### Internal Changes
604
+
605
+ * Allows the SwiftGen source code to be built with Xcode 9.
606
+ This also has the nice side-effect of making the homebrew installation of SwiftGen also available for macOS 10.13.
607
+ [Olivier Halligon](https://github.com/AliSoftware)
608
+ [David Jennes](https://github.com/djbe)
609
+ [#330](https://github.com/SwiftGen/SwiftGen/issues/330)
610
+ [SwiftGen/Eve#10](https://github.com/SwiftGen/Eve/pull/10)
611
+
612
+ ## 5.1.1
613
+
614
+ ### Changes in core dependencies of SwiftGen
615
+
616
+ * [templates 2.1.1](https://github.com/SwiftGen/templates/blob/2.1.1/CHANGELOG.md)
617
+
618
+ ### Bug Fixes
619
+
620
+ * XCAssets: fixed some compatibility issues with the swift 3 template on Xcode 8, and with other templates.
621
+ [David Jennes](https://github.com/djbe)
622
+ [SwiftGen/templates#76](https://github.com/SwiftGen/templates/pull/76)
623
+
624
+ ## 5.1.0
625
+
626
+ ### Changes in core dependencies of SwiftGen
627
+
628
+ * [SwiftGenKit 2.1.0](https://github.com/SwiftGen/SwiftGenKit/blob/2.1.0/CHANGELOG.md)
629
+ * [StencilSwiftKit 2.1.0](https://github.com/SwiftGen/StencilSwiftKit/blob/2.1.0/CHANGELOG.md)
630
+ * [templates 2.1.0](https://github.com/SwiftGen/templates/blob/2.1.0/CHANGELOG.md)
631
+
632
+ ### New Features
633
+
634
+ * Added Swift 4 templates. Use `-t swift4` or whatever variant you want to use
635
+ (see `swiftgen templates list` for the available names).
636
+ [David Jennes](https://github.com/djbe)
637
+ [SwiftGen/templates/#67](https://github.com/SwiftGen/templates/pull/67)
638
+ * XCAssets: Added support for named colors. When using `swiftgen xcassets` the bundled templates
639
+ will now also include colors found in the Asset Catalog in addition to the images.
640
+ [David Jennes](https://github.com/djbe)
641
+ [SwiftGen/templates/#68](https://github.com/SwiftGen/templates/pull/68)
642
+ * Fonts: the path to fonts will now default to just the font filename, but you can disable
643
+ this behaviour by enabling the `preservePath` parameter.
644
+ [David Jennes](https://github.com/djbe)
645
+ [SwiftGen/templates/#71](https://github.com/SwiftGen/templates/pull/71)
646
+ * Colors: new template that uses `#colorLiteral`s.
647
+ Use `swiftgen colors -t literals-swift3` / `swiftgen colors -t literals-swift4` to use them.
648
+ [David Jennes](https://github.com/djbe)
649
+ [SwiftGen/templates/#72](https://github.com/SwiftGen/templates/pull/72)
650
+
651
+ ## 5.0.0
652
+
653
+ ⚠️ 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 command line invocations and custom templates to work with this new major version.
654
+
655
+ Read the [SwiftGen 5.0 Migration Guide](Documentation/MigrationGuide.md#migrating-to-swiftgen-50) for a list of changes you'll need to apply.
656
+
657
+ ### Changes in core dependencies of SwiftGen
658
+
659
+ * [SwiftGenKit 2.0.0](https://github.com/SwiftGen/SwiftGenKit/blob/2.0.0/CHANGELOG.md)
660
+ * [StencilSwiftKit 2.0.0](https://github.com/SwiftGen/StencilSwiftKit/blob/2.0.0/CHANGELOG.md)
661
+ * [Stencil 0.9.0](https://github.com/kylef/Stencil/blob/0.9.0/CHANGELOG.md)
662
+ * [templates 2.0.0](https://github.com/SwiftGen/templates/blob/2.0.0/CHANGELOG.md)
663
+
664
+ ### Breaking Changes
665
+
666
+ * Removed deprecated CLI options. Please consult the migration guide should you still use them.
667
+ [David Jennes](https://github.com/djbe)
668
+ [#301](https://github.com/SwiftGen/SwiftGen/issues/301)
669
+ * Disable default value for named template option and ensure that there is a template option.
670
+ [Liquidsoul](https://github.com/liquidsoul)
671
+ [#283](https://github.com/SwiftGen/SwiftGen/issues/283)
672
+ * Templates are now grouped by parser on the filesystem. This is only important if you had custom templates in the `Application Support` directory. To migrate your templates, place them in a subfolder with the name of the parser, and remove the prefix of the template filename.
673
+ [David Jennes](https://github.com/djbe)
674
+ [#304](https://github.com/SwiftGen/SwiftGen/issues/304)
675
+ * The `images` command has been renamed to `xcassets` to better reflect its functionality.
676
+ [Olivier Halligon](https://github.com/AliSoftware)
677
+ [#317](https://github.com/SwiftGen/SwiftGen/issues/317)
678
+
679
+ #### Notable breaking changes from other SwiftGen repositories
680
+
681
+ * Many deprecated templates have been removed (or merged), and others have been renamed to reflect new behaviours. Please check the [templates migration guide](Documentation/templates/MigrationGuide.md#deprecated-templates-in-20-swiftgen-50) for more information.
682
+ [David Jennes](https://github.com/djbe)
683
+ [SwiftGen/templates#47](https://github.com/SwiftGen/templates/issues/47)
684
+ * There have been some breaking changes in the generated code for storyboards. Please check the [templates migration guide](Documentation/templates/MigrationGuide.md#deprecated-templates-in-20-swiftgen-50) for more information, where we also provide a compatibility template.
685
+ [Olivier Halligon](https://github.com/AliSoftware)
686
+ [SwiftGen/templates#65](https://github.com/SwiftGen/templates/issues/65)
687
+ * Removed deprecated template context variables, and restructured many others. Please check the [SwiftGenKit migration guide](Documentation/SwiftGenKit%20Contexts/MigrationGuide.md#swiftgenkit-20-swiftgen-50-migration-guide) for more information.
688
+ [David Jennes](https://github.com/djbe)
689
+ [SwiftGen/SwiftGenKit#5](https://github.com/SwiftGen/SwiftGenKit/issues/5)
690
+ * Some filters have been removed in favour of Stencil's built in versions, and other filters have been updated to accept parameters. Please consult the [StencilSwiftKit migration guide](https://github.com/SwiftGen/StencilSwiftKit/blob/stable/Documentation/MigrationGuide.md#stencilswiftkit-20-swiftgen-50) for more information.
691
+ [David Jennes](https://github.com/djbe)
692
+ [SwiftGen/StencilSwiftKit#5](https://github.com/SwiftGen/StencilSwiftKit/issues/5)
693
+ [SwiftGen/StencilSwiftKit#6](https://github.com/SwiftGen/StencilSwiftKit/issues/6)
694
+
695
+ ### New Features
696
+
697
+ * Colors and strings commands now accept multiple input files. With these 2 additions, all swiftgen generator commands are able to handle multiple input files.
698
+ [David Jennes](https://github.com/djbe)
699
+ [#313](https://github.com/SwiftGen/SwiftGen/issues/313)
700
+ [SwiftGen/SwiftGenKit#40](https://github.com/SwiftGen/SwiftGenKit/issues/40)
701
+ [SwiftGen/SwiftGenKit#41](https://github.com/SwiftGen/SwiftGenKit/issues/41)
702
+
703
+ ### Internal Changes
704
+
705
+ * Improved installation instructions in the README.
706
+ [Olivier Halligon](https://github.com/AliSoftware)
707
+ [#303](https://github.com/SwiftGen/SwiftGen/issues/303)
708
+
709
+ #### Notable internal changes from other SwiftGen repositories
710
+
711
+ * Switch back from `actool` to an internal parser to fix numerous issues with the former. This fixes issues a few people encountered when using asset catalogs that contained some of the less common set types.
712
+ [David Jennes](https://github.com/djbe)
713
+ [#228](https://github.com/SwiftGen/SwiftGen/issues/228)
714
+ [SwiftGen/SwiftGenKit#43](https://github.com/SwiftGen/SwiftGenKit/issues/43)
715
+
716
+ ## 4.2.1
717
+
718
+ ### Changes in core dependencies of SwiftGen
719
+
720
+ * [SwiftGenKit 1.1.0](https://github.com/SwiftGen/SwiftGenKit/blob/1.1.0/CHANGELOG.md)
721
+ * [StencilSwiftKit 1.0.2](https://github.com/SwiftGen/StencilSwiftKit/blob/1.0.2/CHANGELOG.md)
722
+ * [Stencil 0.9.0](https://github.com/kylef/Stencil/blob/0.9.0/CHANGELOG.md)
723
+ * [templates 1.1.0](https://github.com/SwiftGen/templates/blob/1.1.0/CHANGELOG.md)
724
+
725
+ ### Bug Fixes
726
+
727
+ * Fix a bug in which the version of SwiftGen was reported as `v0.0` by `swiftgen --version`.
728
+ [Olivier Halligon](https://github.com/AliSoftware)
729
+
730
+ ### Internal Changes
731
+
732
+ * Update StencilGenKit to 1.0.2 and update Circle CI to Xcode 8.3.
733
+ [Diogo Tridapalli](https://github.com/diogot)
734
+ [#295](https://github.com/SwiftGen/SwiftGen/issues/295)
735
+ * Switch from Travis CI to Circle CI, clean up the Rakefile in the process.
736
+ [David Jennes](https://github.com/djbe)
737
+ [Olivier Halligon](https://github.com/AliSoftware)
738
+ [#269](https://github.com/SwiftGen/SwiftGen/pull/269)
739
+ * Fix remaining enum names not Swift 3 compliant.
740
+ [Liquidsoul](https://github.com/liquidsoul)
741
+ [#297](https://github.com/SwiftGen/SwiftGen/issues/297)
742
+ * Added the `CONTRIBUTING.md` file to help new contributors.
743
+ [Olivier Halligon](https://github.com/AliSoftware)
744
+ [Cihat Gündüz](https://github.com/Dschee)
745
+ [#149](https://github.com/SwiftGen/SwiftGen/pull/149)
746
+ [#298](https://github.com/SwiftGen/SwiftGen/pull/298)
747
+
748
+ ## 4.2.0
749
+
750
+ ### Changes in core dependencies of SwiftGen
751
+
752
+ * [SwiftGenKit 1.0.1](https://github.com/SwiftGen/SwiftGenKit/blob/1.0.1/CHANGELOG.md)
753
+ * [StencilSwiftKit 1.0.0](https://github.com/SwiftGen/StencilSwiftKit/blob/1.0.0/CHANGELOG.md)
754
+ * [Stencil 0.8.0](https://github.com/kylef/Stencil/blob/0.8.0/CHANGELOG.md)
755
+ * [templates 1.0.0](https://github.com/SwiftGen/templates/blob/1.0.0/CHANGELOG.md)
756
+
757
+ ### New Features
758
+
759
+ * You can now pass custom parameters to your templates using the `--param X=Y` syntax.
760
+ [@djbe](https://github.com/djbe)
761
+ [#265](https://github.com/SwiftGen/SwiftGen/pull/265/commits/3a7971ccbf16c41f0b2341e71b8a1ffbcabebecf)
762
+ * This command-line option can be repeated at will and used to pass structured custom parameters (e.g. `--param tabs=2 --param foo.bar=1 --param foo.baz=2`).
763
+ * You can then use them in your templates using e.g. `{{param.tabs}}`, `{{param.foo.bar}}` & `{{param.foo.baz}}`.
764
+ * Templates can now access environment variables via the `env` key of the Stencil context (e.g. `{{env.USER}}`, `{{env.LANG}}`).
765
+ [@djbe](https://github.com/djbe)
766
+ [#265](https://github.com/SwiftGen/SwiftGen/pull/265/commits/3a7971ccbf16c41f0b2341e71b8a1ffbcabebecf)
767
+ * This is especially useful when integrating SwiftGen as a Script Build Phase in your Xcode project as you can then access Xcode Build Settings exposed as
768
+ environment variables by Xcode, e.g. `{{env.PRODUCT_MODULE_NAME}}`.
769
+
770
+ #### Notable new features from other SwiftGen repositories
771
+
772
+ * Use an explicit bundle parameter to support frameworks for all templates.
773
+ [@NachoSoto](https://github.com/NachoSoto)
774
+ [@djbe](https://github.com/djbe)
775
+ [#255](https://github.com/SwiftGen/SwiftGen/pull/255)
776
+ [SwiftGen/templates#17](https://github.com/SwiftGen/templates/pull/17)
777
+
778
+ ### Deprecations
779
+
780
+ In preparation for an upcoming cleanup of SwiftGen to remove some legacy code as well as Stencil old variables, tags and filters, and change the default templates to Swift 3, **some things are being deprecated and will be removed in the next major version 5.0**.
781
+
782
+ As a result, if you wrote custom templates, you should already prepare for the upcoming 5.0 by migrating your templates to use the new variables (already avaiable in SwiftGen 4.2 / SwiftGenKit 1.0).
783
+
784
+ See [#244](https://github.com/SwiftGen/SwiftGen/issues/244) and [the Migration Guide](Documentation/MigrationGuide.md) for a list of deprecations and their replacements.
785
+
786
+ ### Bug Fixes
787
+
788
+ #### Notable bug fixes from other SwiftGen repositories
789
+
790
+ * Storyboards templates won't `import` your app module anymore,
791
+ removing that annoying warning.
792
+ [@djbe](https://github.com/djbe)
793
+ [SwiftGen/templates#19](https://github.com/SwiftGen/templates/pull/19)
794
+
795
+ ### Internal changes
796
+
797
+ * SwiftGen has migrated to [its own GitHub organization](https://github.com/SwiftGen/SwiftGen) 🎉.
798
+ * SwiftGen has been split in multiple repositories and separate modules.
799
+ [Olivier Halligon](https://github.com/AliSoftware)
800
+ [@djbe](https://github.com/djbe)
801
+ [#240](https://github.com/SwiftGen/SwiftGen/issues/240)
802
+ [#265](https://github.com/SwiftGen/SwiftGen/pull/265)
803
+ * The present [SwiftGen](https://github.com/SwiftGen/SwiftGen) is the CLI parsing. It is in charge of calling the frameworks, feeding them appropriate parameters according to the command line arguments.
804
+ * [SwiftGenKit](https://github.com/SwiftGen/SwiftGenKit) is the framework responsible for parsing your assets/resources and turning them into a structured representation compatible with `Stencil` templates.
805
+ * [StencilSwiftKit](https://github.com/SwiftGen/StencilSwiftKit) is a framework adding some extensions to the template engine [Stencil](https://github.com/kylef/Stencil) used by SwiftGen. It adds some tags and filters as well as convenience methods shared both by SwiftGen itself and by [Sourcery](https://github.com/krzysztofzablocki/Sourcery).
806
+ * The SwiftGen templates has been moved into [a dedicated templates repo](https://github.com/SwiftGen/templates) so they can evolve and be unit-tested separately of SwiftGen.
807
+
808
+ Note: The next minor version will focus on bringing more documentation for all this new structure and improve ease of future contributions.
809
+
810
+ ## 4.1.0
811
+
812
+ ### New Features
813
+
814
+ * Added a script reference to simplify and automate localization of existing non localized project.
815
+ [HuguesBR](https://github.com/HuguesBR)
816
+ * Added a `storyboards-osx-swift3` template.
817
+ [Felix Lisczyk](https://github.com/FelixII)
818
+ [#225](https://github.com/SwiftGen/SwiftGen/pull/225)
819
+ * Added a `strings-no-comments-swift3` template that does not include the
820
+ default translation of each key.
821
+ [Loïs Di Qual](https://github.com/ldiqual)
822
+ [#222](https://github.com/SwiftGen/SwiftGen/issues/222)
823
+ * Images: new dot-syntax template, use `dot-syntax-swift3` or `dot-syntax` (for
824
+ Swift 2.3).
825
+ [David Jennes](https://github.com/djbe)
826
+ [#206](https://github.com/SwiftGen/SwiftGen/pull/206)
827
+ * Reworked the "dot-syntax" and "structured" templates to use the new `macro`
828
+ and `call` tags, which greatly simplifies the templates, and also removes the
829
+ limitation of 5-level deep structures.
830
+ [David Jennes](https://github.com/djbe)
831
+ [#237](https://github.com/SwiftGen/SwiftGen/pull/237)
832
+ * Storyboards: automatically detect the correct modules that need to be
833
+ imported. The `--import` option has therefore been deprecated, as well as the
834
+ `extraImports` template variable. Instead use the the new `modules` variable,
835
+ which offers the same functionality.
836
+ [David Jennes](https://github.com/djbe)
837
+ [#243](https://github.com/SwiftGen/SwiftGen/pull/243)
838
+ * Support multiple input paths for some commands.
839
+ [David Jennes](https://github.com/djbe)
840
+ [#213](https://github.com/SwiftGen/SwiftGen/pull/213)
841
+ * `fonts` accepts multiple input directories, all found fonts will be added
842
+ to the `families` template variable.
843
+ * `images` now supports multiple asset catalogs as input. Templates can now
844
+ use the `catalogs` variable to access each individual catalog.
845
+ * `storyboards` accepts multiple paths (to folders or `storyboard` files).
846
+ All found storyboards will be available in the `storyboards` template
847
+ variable.
848
+
849
+ ### Bug Fixes
850
+
851
+ * Strings: fix issue with `dot-syntax-swift3` where function definitions were
852
+ not Swift 3 guidelines compliant.
853
+ [David Jennes](https://github.com/djbe)
854
+ [#241](https://github.com/SwiftGen/SwiftGen/issues/241)
855
+ [#247](https://github.com/SwiftGen/SwiftGen/pull/247)
856
+ * Snake cased keys with uppercase letters are correctly camel cased again.
857
+ [Cihat Gündüz](https://github.com/Dschee)
858
+ [#226](https://github.com/SwiftGen/SwiftGen/issues/226)
859
+ [#233](https://github.com/SwiftGen/SwiftGen/pull/233)
860
+
861
+ ### Internal changes
862
+
863
+ * Better error handling in the `colors` command.
864
+ [David Jennes](https://github.com/djbe)
865
+ [#227](https://github.com/SwiftGen/SwiftGen/pull/227)
866
+ * Stencil: added two new tags `macro` and `call`, see the
867
+ [documentation](https://github.com/SwiftGen/SwiftGen/blob/4.1.0/documentation/Templates.md). for in depth explanations on how
868
+ to use them.
869
+ [David Jennes](https://github.com/djbe)
870
+ [#237](https://github.com/SwiftGen/SwiftGen/pull/237)
871
+ * SwiftLint: Remove `switch_case_on_newline` warning for generated color file.
872
+ [Mickael Titeca](https://github.com/MickaCapi)
873
+ [#239](https://github.com/SwiftGen/SwiftGen/pull/239)
874
+ * Stencil: better string filter testing and fixed a small issue with
875
+ `lowerFirstWord`.
876
+ [David Jennes](https://github.com/djbe)
877
+ [#245](https://github.com/SwiftGen/SwiftGen/pull/245)
878
+
879
+ ## 4.0.1
880
+
881
+ ### Bug Fixes
882
+
883
+ * Escape newlines again in .strings file keys.
884
+ [ChristopherRogers](https://github.com/ChristopherRogers)
885
+ [#208](https://github.com/SwiftGen/SwiftGen/pull/208)
886
+ * Fix broken `import` option added in 4.0.0.
887
+ [David Jennes](https://github.com/djbe)
888
+ [#214](https://github.com/SwiftGen/SwiftGen/pull/214)
889
+ * Show an error when the provided path to the `images` command is not an asset
890
+ catalog.
891
+ [David Jennes](https://github.com/djbe)
892
+ [#217](https://github.com/SwiftGen/SwiftGen/pull/217)
893
+ * Strings dot-syntax template: use `enum`s for namespacing instead of `struct`s.
894
+ [David Jennes](https://github.com/djbe)
895
+ [#218](https://github.com/SwiftGen/SwiftGen/pull/218)
896
+
897
+ ### Internal changes
898
+
899
+ * Swift 3 migration.
900
+ [ahtierney](https://github.com/ahtierney)
901
+ [#201](https://github.com/SwiftGen/SwiftGen/pull/201)
902
+ * Restructure the SwiftGen project to build as an `.app` during
903
+ developement, for easier debugging in Xcode.
904
+ [ahtierney](https://github.com/ahtierney)
905
+ [#204](https://github.com/SwiftGen/SwiftGen/pull/204)
906
+ * Consolidate the use of PathKit internally.
907
+ [David Jennes](https://github.com/djbe)
908
+ [#212](https://github.com/SwiftGen/SwiftGen/pull/212)
909
+ * Updated Stencil to [0.7.2](https://github.com/kylef/Stencil/releases/tag/0.7.0).
910
+ [Kyle Fuller](https://github.com/kylef)
911
+ [#216](https://github.com/SwiftGen/SwiftGen/issues/216)
912
+
913
+ ## 4.0.0
914
+
915
+ ### Breaking Changes
916
+
917
+ * Change swift 3 storyboard segue template's sender from `AnyObject` to `Any`.
918
+ [Derek Ostrander](https://github.com/dostrander)
919
+ [#197](https://github.com/SwiftGen/SwiftGen/pull/197)
920
+ * Fix swift 3 storyboard templates to be compliant with swift 3 api design guidelines.
921
+ [Afonso](https://github.com/afonsograca)
922
+ [#194](https://github.com/SwiftGen/SwiftGen/pull/194)
923
+ * Remove the `key` param label from the `tr` function for Localized String in the Swift 3 template.
924
+ [AndrewSB](https://github.com/AndrewSB)
925
+ [#190](https://github.com/SwiftGen/SwiftGen/pull/190)
926
+ * The `swiftgen images` command now uses the `actool` utility to parse asset catalogs,
927
+ ensuring that the parser correctly handles namespaced folders.
928
+  ⚠️ Note that you now have to specify the exact path to your `.xcassets` assets catalogs
929
+  when using `swiftgen images` (and not just a directory to parse).
930
+ [David Jennes](https://github.com/djbe)
931
+ [#199](https://github.com/SwiftGen/SwiftGen/pull/199)
932
+
933
+ ### New Features
934
+
935
+ * Add support for multiline strings in `*.strings` file.
936
+ [Jeong Yonguk](https://github.com/alldne)
937
+ [#192](https://github.com/SwiftGen/SwiftGen/pull/192)
938
+ * Add option to add import statements at the top of the generated swift file (for
939
+ storyboards) using the `import` flag.
940
+ [David Jennes](https://github.com/djbe)
941
+ [#175](https://github.com/SwiftGen/SwiftGen/pull/175)
942
+ * Escape reserved swift keywords in the structured and dot-syntax generated strings code.
943
+ [Afonso](https://github.com/afonsograca)
944
+ [#198](https://github.com/SwiftGen/SwiftGen/pull/198)
945
+
946
+ ## 3.0.1
947
+
948
+ * Add support for Xcode 8 and Swift 2.3.
949
+ _(Should still compile in Xcode 7.3 but the `Rakefile` to build, install and release requires Xcode 8)_.
950
+ [Valentin Knabel](https://github.com/vknabel)
951
+ [Ignacio Romero Zurbuchen](https://github.com/dzenbot)
952
+ [HanxuanZhou](https://github.com/GenoZhou)
953
+ [Syo Ikeda](https://github.com/ikesyo)
954
+
955
+
956
+ ## 3.0.0
957
+
958
+ * Add template that calls `NSLocalizedString()` separately for each string,
959
+ which is useful when trying to extract strings in the app to a `.strings` file.
960
+ [Ahmet Karalar](https://github.com/akaralar)
961
+ * Add some `file_length` and similar SwiftLint exceptions in bundled templates, as
962
+ files generated by SwiftGen might contain lots of constants and can be long by design.
963
+ [Olivier Halligon](https://github.com/AliSoftware)
964
+ * Error messages ("template not found", etc) are now printed on `stderr`.
965
+ [Olivier Halligon](https://github.com/AliSoftware)
966
+ * Add more `swiftgen templates` subcommands.
967
+ [Olivier Halligon](https://github.com/AliSoftware)
968
+ * `swiftgen templates list` lists all the available templates
969
+ * `swiftgen templates which <name>` prints the path to the template named `<name>`
970
+ * `swiftgen templates cat <name>` prints the content to the template named `<name>`
971
+ * `<name>` here can be either a parser name like `colors` or a
972
+ composed name `colors-rawValue` for a specific template.
973
+ * Fix swift 3 renaming change in strings-swift3.stencil.
974
+ [Kilian Koeltzsch](https://github.com/kiliankoe)
975
+ [#150](https://github.com/SwiftGen/SwiftGen/pull/150)
976
+ * Fix non-custom class, non-base view controller handling in storyboards-swift3.stencil.
977
+ [Syo Ikeda](https://github.com/ikesyo)
978
+ [#152](https://github.com/SwiftGen/SwiftGen/pull/152)
979
+ * Add strongly typed `initialViewController()` overrides for storyboard templates if available.
980
+ [Syo Ikeda](https://github.com/ikesyo)
981
+ [#153](https://github.com/SwiftGen/SwiftGen/pull/153)
982
+ [#163](https://github.com/SwiftGen/SwiftGen/pull/163)
983
+ * Add support for font files containing multiple descriptors.
984
+ [Chris Ellsworth](https://github.com/chrisellsworth)
985
+ [#156](https://github.com/SwiftGen/SwiftGen/pull/156)
986
+ * Update deprecated usage of generics for Swift 3 / Xcode 8 beta 6.
987
+ [Chris Ellsworth](https://github.com/chrisellsworth)
988
+ [#158](https://github.com/SwiftGen/SwiftGen/pull/158)
989
+ * Fix case when missing positional parameters, which leads to parameters in the enum with
990
+ unspecified type (undeterminable from the `Localizable.strings` format analysis) where
991
+ reported as `Any` — which is not a `CVarArgType`. Now using `UnsafePointer<()>`
992
+ arguments instead for such odd edge-cases that should never happen anyway.
993
+ [Olivier Halligon](https://github.com/AliSoftware)
994
+ * Now reports an error when it failed to parse a color in a color input file.
995
+ [Olivier Halligon](https://github.com/AliSoftware)
996
+ [#162](https://github.com/SwiftGen/SwiftGen/issues/162)
997
+ * 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.
998
+ [Cihat Gündüz](https://github.com/Dschee)
999
+ [#159](https://github.com/SwiftGen/SwiftGen/pull/159)
1000
+ * Update Swift 3 templates to use lowercase enums.
1001
+ [Olivier Halligon](https://github.com/AliSoftware)
1002
+ [#166](https://github.com/SwiftGen/SwiftGen/pull/166)
1003
+ * New Strings template (available via `-t dot-syntax-swift3`), allowing keys with dots in Swift 3 (see above).
1004
+ [Cihat Gündüz](https://github.com/Dschee)
1005
+ [#168](https://github.com/SwiftGen/SwiftGen/pull/168)
1006
+
1007
+ > 💡 You can now **create your custom templates more easier than ever**, by cloning an existing template!
1008
+ >
1009
+ > e.g. to clone [the default `strings-default.stencil` template](https://github.com/SwiftGen/SwiftGen/blob/3.0.0/templates/strings-default.stencil):
1010
+ >
1011
+ > * use `swiftgen templates cat strings --output strings-custom.stencil`
1012
+ > * modify the cloned `strings-custom.stencil` template to your liking
1013
+ > * use it with `swiftgen strings … --templatePath strings-custom.stencil …` in your projects!
1014
+
1015
+ ### Important Notes
1016
+
1017
+ - 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).
1018
+ Please read the [Custom Templates documentation](https://github.com/SwiftGen/SwiftGen/blob/4.1.0/documentation/Templates.md) to find out the new Stencil context keys and update your custom templates accordingly.
1019
+
1020
+ _If you're using one of the bundled templates, all of them have been updated appropriately._
1021
+
1022
+ - 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.
1023
+
1024
+ ## 2.0.0
1025
+
1026
+ * Fix issue with txt files bailing on comments.
1027
+ [Derek Ostrander](https://github.com/dostrander)
1028
+ [#140](https://github.com/SwiftGen/SwiftGen/issues/140)
1029
+ * Added support for tvOS and watchOS in images, fonts and color templates.
1030
+ [Tom Baranes](https://github.com/tbaranes)
1031
+ [#145](https://github.com/SwiftGen/SwiftGen/pull/145)
1032
+ * Added enum-based structured identifiers via `-t structured` option.
1033
+ [Cihat Gündüz](https://github.com/Dschee)
1034
+ [#148](https://github.com/SwiftGen/SwiftGen/pull/148)
1035
+ * Added support for OSX in storyboards.
1036
+ [Tom Baranes](https://github.com/tbaranes)
1037
+ [#131](https://github.com/SwiftGen/SwiftGen/pull/131)
1038
+
1039
+ Note: The `Stencil` context keys (the name of the variables used in templates) for storyboard has changed a bit.
1040
+ Especially, `class` has been renamed into `customClass` (see [#131](https://github.com/SwiftGen/SwiftGen/pull/131))
1041
+ to better describe the intent (as this isn't defined if there is no _custom_ class set in the Storyboard), and
1042
+ new keys `isBaseViewController` and `baseType` has been added.
1043
+
1044
+ This means that if you did implement your own custom templates for storyboards (instead of using the bundled ones),
1045
+ you'll have to remplace `{{class}}` by `{{customClass}}` in those storyboard templates, otherwise they'll probably
1046
+ stop working as expected. That's the main reason why the version has been bumped to a major version 2.0.0.
1047
+
1048
+
1049
+ ## 1.1.2
1050
+
1051
+ * Fix issue introduced by 1.1.1 in storyboard templates not returning.
1052
+ [Ben Chatelain](https://github.com/phatblat)
1053
+ [#138](https://github.com/SwiftGen/SwiftGen/pull/138)
1054
+
1055
+ ## 1.1.1
1056
+
1057
+ * Removed the last force-unwrap from storyboard templates.
1058
+ [Olivier Halligon](https://github.com/AliSoftware)
1059
+
1060
+ ## 1.1.0
1061
+
1062
+ * Added step to ensure all templates are [Swiftlint](https://github.com/realm/SwiftLint)'ed
1063
+ and don't violate any code style rule.
1064
+ [Olivier Halligon](https://github.com/AliSoftware)
1065
+ [AJ9](https://github.com/AJ9)
1066
+ [#80](https://github.com/SwiftGen/SwiftGen/pull/80)
1067
+ * Added support for OSX in images, fonts and color templates.
1068
+ [Tom Baranes](https://github.com/tbaranes)
1069
+ [#125](https://github.com/SwiftGen/SwiftGen/pull/125)
1070
+ [#126](https://github.com/SwiftGen/SwiftGen/pull/126)
1071
+ [#127](https://github.com/SwiftGen/SwiftGen/pull/127)
1072
+ * Added missing FontConvertible protocol conformance to default fonts template.
1073
+ [Ben Chatelain](https://github.com/phatblat)
1074
+ [#129](https://github.com/SwiftGen/SwiftGen/pull/129)
1075
+
1076
+ ## 1.0.0
1077
+
1078
+ * Restructured colors & fonts templates to workaround the same LLVM issue as #112 with nested types
1079
+ inside existing UIKit classes in Release/Optimized builds.
1080
+ [Olivier Halligon](https://github.com/AliSoftware)
1081
+ * Added support for Fonts using the `swiftgen fonts` command.
1082
+ [Derek Ostrander](https://github.com/dostrander)
1083
+ [#102](https://github.com/SwiftGen/SwiftGen/pull/102)
1084
+ * Added support for TXT (`colors.txt`) files to have named value.
1085
+ [Derek Ostrander](https://github.com/dostrander)
1086
+ [#118](https://github.com/SwiftGen/SwiftGen/pull/118)
1087
+ * Restructured image templates to work around an LLVM issue with nested types.
1088
+ [Ken Grigsby](https://github.com/kgrigsby59)
1089
+ [#112](https://github.com/SwiftGen/SwiftGen/issues/112)
1090
+ * Added Swift 3 templates for storyboards and strings.
1091
+ [Andrew Breckenridge](https://github.com/AndrewSB)
1092
+ [#117](https://github.com/SwiftGen/SwiftGen/pull/117)
1093
+
1094
+ ## 0.8.0
1095
+
1096
+ * Introducing alternative way to install SwiftGen: using CocoaPods! See README for more details.
1097
+ [Olivier Halligon](https://github.com/AliSoftware)
1098
+ [#95](https://github.com/SwiftGen/SwiftGen/issues/95)
1099
+ * Added support for JSON (`colors.json`) files as input for the `swiftgen colors` subcommand.
1100
+ [Derek Ostrander](https://github.com/dostrander)
1101
+ * Use `String(format:locale:arguments:)` and the `NSLocale.currentLocale()` in the "string" templates so that it works with `.stringdict` files and pluralization.
1102
+ [Olivier Halligon](https://github.com/AliSoftware)
1103
+ [#91](https://github.com/SwiftGen/SwiftGen/issues/91)
1104
+ * Add support for Android `colors.xml` files as input for the `swiftgen colors` subcommand.
1105
+ [Olivier Halligon](https://github.com/AliSoftware)
1106
+ [#15](https://github.com/SwiftGen/SwiftGen/issues/15)
1107
+ * Removed the useless `import Foundation` from the "images" templates.
1108
+ [Olivier Halligon](https://github.com/AliSoftware)
1109
+ * Added computed property `var color: UIColor` to the color templates.
1110
+ [Olivier Halligon](https://github.com/AliSoftware)
1111
+
1112
+
1113
+ ## 0.7.6
1114
+
1115
+ #### Enhancements
1116
+
1117
+ * Fixed build loop by changing SwiftGen to only write to the output file if the generated code is different from the file contents.
1118
+ [Mathias Nagler](https://github.com/mathiasnagler)
1119
+ [#90](https://github.com/SwiftGen/SwiftGen/pull/90)
1120
+
1121
+ #### Fixes
1122
+
1123
+ * 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.
1124
+ [Pan Kolega](https://github.com/pankolega)
1125
+ [#83](https://github.com/SwiftGen/SwiftGen/pull/83)
1126
+ * Fixed issue in `Rakefile` when trying to install via `rake` in a path containing `~`.
1127
+ [Jesse Armand](https://github.com/jessearmand)
1128
+ [#88](https://github.com/SwiftGen/SwiftGen/pull/88)
1129
+
1130
+ ## 0.7.5
1131
+
1132
+ #### Enhancements
1133
+
1134
+ * Updated stencils and unit tests to pass [SwiftLint](https://github.com/realm/SwiftLint).
1135
+ [Adam Gask](https://github.com/AJ9)
1136
+ [#79](https://github.com/SwiftGen/SwiftGen/pull/79)
1137
+ * Updated `storyboards-default.stencil` to better avoid name confusions.
1138
+ [Olivier Halligon](https://github.com/AliSoftware)
1139
+ * Now `cases` names are suffixed with `…Scene` and `static func` are prefixed with `instantiate…` to lower the risks of a name conflict with your ViewController classes.
1140
+ * The old template is still available but has been renamed `storyboards-uppercase.stencil`
1141
+ * Added support for `*.clr` files (files to store `NSColorList`'s presented in Color Picker on "Color Palettes" tab).
1142
+ [Ilya Puchka](https://github.com/ilyapuchka)
1143
+ [#81](https://github.com/SwiftGen/SwiftGen/pull/81)
1144
+
1145
+ ## 0.7.4
1146
+
1147
+ #### Enhancements
1148
+
1149
+ * Added View Controller Placeholders support.
1150
+ [Viacheslav Karamov](https://github.com/vkaramov/)
1151
+ [#61](https://github.com/SwiftGen/SwiftGen/issues/61)
1152
+
1153
+ ## 0.7.3
1154
+
1155
+ #### Fixes
1156
+
1157
+ * Restructured storyboard templates to work around an LLVM issue with nested types.
1158
+ [Ryan Booker](https://github.com/ryanbooker)
1159
+ [#57](https://github.com/SwiftGen/SwiftGen/issues/57#issuecomment-159996671)
1160
+
1161
+ > Scenes and Segues are now referenced via `StoryboardScene.<Storyboard>` and `StoryboardSegue.<Storyboard>.<Segue>`
1162
+
1163
+ ## 0.7.2
1164
+
1165
+ #### Enhancements
1166
+
1167
+ * Adding comments to generated color enums which allow you to see the color in the QuickHelp documentation.
1168
+
1169
+ * The default translation of strings are now added as documentation comments to the enum cases.
1170
+ _You can add translations to your own templates by using the `string.translation` variable_.
1171
+ [@MrAlek](https://github.com/MrAlek)
1172
+ [#58](https://github.com/SwiftGen/SwiftGen/issues/58)
1173
+ [#60](https://github.com/SwiftGen/SwiftGen/pull/60)
1174
+
1175
+ #### Fixes
1176
+
1177
+ * Fix an issue with the colors template due to an Apple Bug when building in Release and with WMO enabled.
1178
+ [#56](https://github.com/SwiftGen/SwiftGen/issues/56)
1179
+
1180
+ ## 0.7.1
1181
+
1182
+ #### Fixes
1183
+
1184
+ * Fix issue with `swiftgen strings` that were using the colors templates instead of the strings template by default.
1185
+ [@ChristopherRogers](https://github.com/ChristopherRogers)
1186
+ [#54](https://github.com/SwiftGen/SwiftGen/pull/54)
1187
+
1188
+ ## 0.7.0
1189
+
1190
+ #### Enhancements
1191
+
1192
+ * Allow using **custom templates by name**.
1193
+ [#42](https://github.com/SwiftGen/SwiftGen/issues/42)
1194
+ [#50](https://github.com/SwiftGen/SwiftGen/pull/50)
1195
+ * Now the `-t` flag expect a template name (defaults to `default`), and will search a matching template in `Application Support` first, then in the templates bundled with SwiftGen.
1196
+ * You can still specify a template by path using `-p`.
1197
+ * For more info, see [this dedicated documentation](https://github.com/SwiftGen/SwiftGen/blob/4.1.0/documentation/Templates.md).
1198
+ * You can now list all templates available (both bundled templates and custom ones) using the `swiftgen templates` command.
1199
+ [#42](https://github.com/SwiftGen/SwiftGen/issues/42)
1200
+ [#50](https://github.com/SwiftGen/SwiftGen/pull/50)
1201
+ * Add a `performSegue(_:sender:)` extension on `UIViewController` to accept a `StoryboardSegue` as parameter.
1202
+ You can now for example call `vc.performSegue(UIStoryboard.Segue.Wizard.ShowPassword)`.
1203
+ [#37](https://github.com/SwiftGen/SwiftGen/issues/37)
1204
+
1205
+ SwiftGen now comes bundled with some alternate templates, especially `colors-rawValue`, `images-allvalues` and `storyboards-lowercase`, in addition to the default templates.
1206
+
1207
+ #### Fixes
1208
+
1209
+ * Now `swiftgen storyboards` doesn't generate duplicate enum cases for identical segues (those having equal identifiers and shared custom class).
1210
+ [@filwag](https://github.com/filwag)
1211
+ [#43](https://github.com/SwiftGen/SwiftGen/pull/43)
1212
+ * Fix compilation issue for storyboards without any scene.
1213
+ [Viacheslav Karamov](https://github.com/vkaramov/)
1214
+ [#47](https://github.com/SwiftGen/SwiftGen/issues/47)
1215
+ * Propose an alternate template using lowercase names, especially for when storyboard identifiers match view controller class names.
1216
+ [Viacheslav Karamov](https://github.com/vkaramov/)
1217
+ [#48](https://github.com/SwiftGen/SwiftGen/issues/48)
1218
+ * Introduced an `image-allvalues` template that exposes the list of all images in a `static let allValues` array.
1219
+ [Ahmed Mseddi](https://github.com/amseddi)
1220
+ & Guillaume Lagorce
1221
+ [#44](https://github.com/SwiftGen/SwiftGen/pull/44)
1222
+ * Fix issue with Storyboards without any StoryboardID (all scenes being anonymous) not extending `StoryboardScene`.
1223
+ [#36](https://github.com/SwiftGen/SwiftGen/issues/36)
1224
+
1225
+ ## 0.6.0
1226
+
1227
+ ### New Features: Templates
1228
+
1229
+ * `SwiftGen` now uses [Stencil](https://github.com/kylef/Stencil) template engine to produce the generated code.
1230
+ * This means that the generate code will be easier to improve.
1231
+ * This also means that **you can use your own templates** to generate code that better suits your needs and preferences, using `swiftgen … --template FILE …`.
1232
+
1233
+ ### Fixes
1234
+
1235
+ * The correct type of _ViewController_ (`UIViewController`, `UINavigationController`, `UITableViewController`, …) is now correctly generated even if not a custom subclass.
1236
+ [#40](https://github.com/SwiftGen/SwiftGen/issues/40)
1237
+ * Fix issue with `.strings` files encoded in UTF8.
1238
+ [#21](https://github.com/SwiftGen/SwiftGen/issues/21)
1239
+
1240
+ ## 0.5.2
1241
+
1242
+ ### New Features
1243
+
1244
+ * It's now possible to specify which chars should not be used when generating `case` identifiers.
1245
+ [@Igor-Palaguta](https://github.com/Igor-Palaguta)
1246
+ [#34](https://github.com/SwiftGen/SwiftGen/pull/34)
1247
+
1248
+ ## 0.5.1
1249
+
1250
+ #### Fixes
1251
+
1252
+ * Installing via `rake install` or `brew install` will now copy the Swift dylibs too, so that `swiftgen` installation won't depend on the location of your Xcode.app (so it'll work on every machine even if you rename your Xcode).
1253
+ * Fixed links in Playground and Licence headers in source code.
1254
+
1255
+ ## 0.5.0
1256
+
1257
+ #### New Features
1258
+
1259
+ * Migrating to [Commander](https://github.com/kylef/Commander) to parse the CLI arguments.
1260
+ [23](https://github.com/SwiftGen/SwiftGen/issues/23)
1261
+ [#30](https://github.com/SwiftGen/SwiftGen/issues/30)
1262
+ * `swiftgen` is now a single binary, and the subcommand names have changed to be more consistent.
1263
+ [#30](https://github.com/SwiftGen/SwiftGen/issues/30)
1264
+ * New `--output` option.
1265
+ [#30](https://github.com/SwiftGen/SwiftGen/issues/30)
1266
+
1267
+ > You must now use the subcommands `swiftgen images`, `swiftgen strings`, `swiftgen storyboards` and `swiftgen colors`. See `swiftgen --help` for more usage info.
1268
+
1269
+ #### Fixes
1270
+
1271
+ * Fix color parsing with absent alpha.
1272
+ [@Igor-Palaguta](https://github.com/Igor-Palaguta)
1273
+ [#28](https://github.com/SwiftGen/SwiftGen/pull/28)
1274
+
1275
+ ## 0.4.4
1276
+
1277
+ * Updated Unit tests for latest Swift 2.0 & tested against Xcode 7.1
1278
+ * Fix small typos in code
1279
+ * Guard against empty `enums`
1280
+
1281
+ ## 0.4.3
1282
+
1283
+ * Updated for Xcode 7 Beta 6.
1284
+ [@Dimentar](https://github.com/Dimentar)
1285
+ [#14](https://github.com/SwiftGen/SwiftGen/pull/14)
1286
+
1287
+ ## 0.4.2
1288
+
1289
+ * Added `import Foundation` on top of `swiftgen-l10n` generated code.
1290
+ [@Nick11](https://github.com/Nick11)
1291
+ [#12](https://github.com/SwiftGen/SwiftGen/pull/12)
1292
+
1293
+ ## 0.4.1
1294
+
1295
+ * Updated for Xcode 7 Beta 5
1296
+ * `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)
1297
+ * The `-v` and `--version` flags are now recognized and print the executable version.
1298
+
1299
+ ## 0.4.0
1300
+
1301
+ * Reorganized files into an **Xcode project** with one target per executable.
1302
+ [#2](https://github.com/SwiftGen/SwiftGen/issues/2)
1303
+ * Added **Unit Tests** (one per executable + one for common code).
1304
+ [#2](https://github.com/SwiftGen/SwiftGen/issues/2)
1305
+ * Improved `SwiftGen-L10n` parsing of format strings and placeholders.
1306
+ [#4](https://github.com/SwiftGen/SwiftGen/issues/4)
1307
+ [#5](https://github.com/SwiftGen/SwiftGen/issues/5)
1308
+ [#6](https://github.com/SwiftGen/SwiftGen/issues/6)
1309
+ * Updated `Rakefile` so that it now invokes `xcodebuild install`. You can now easily build & install all `swiftgen-xxx` executables in `/usr/local/bin` or anywhere else.
1310
+ * Added a **version** string (date + sha1) to the built executables (displayed when invoked with no argument)
1311
+
1312
+ ## 0.3.0
1313
+
1314
+ * Reducted the default code generated by `SwiftGenColorEnumBuilder` to avoid clobbering the `UIColor` namespace
1315
+ * Changed the "namespacing `enum`" in `UIStoryboard` to a `struct` to avoid confusion with the inner enums
1316
+ * The `UIStoryboard.Scene` enums now use `static func` instead of `static var` for the dedicated `ViewController` constructors ^(†)
1317
+
1318
+ ^(†) _because it feels more explicit that calling a function like `UIStoryboard.Scene.Wizard.validatePasswordViewController()` will actually **instantiate** a new `ViewController`, rather than returning an existing one._
1319
+
1320
+ ## 0.2.0
1321
+
1322
+ * Added `Segues` enums to `UIStoryboard` to be able to access their identifiers easily.
1323
+ [@esttorhe](https://github.com/esttorhe)
1324
+ [#8](https://github.com/SwiftGen/SwiftGen/pull/8)
1325
+ * Added this very `CHANGELOG.md`
1326
+
1327
+ ## 0.1.0
1328
+
1329
+ Considered to be the first cleaned-up version, far from finished but really usable with clean code.
1330
+
1331
+ * Cleaner README
1332
+ * Namespace the generated `enums` in an outer `enum` to avoid clobbering the `UIStoryboard` namespace
1333
+
1334
+ ## 0.0.4
1335
+
1336
+ * Introducing `SwiftGenColorEnumBuilder`
1337
+ * `swiftgen-colors` CLI
1338
+ * Added ability to choose indentation
1339
+
1340
+ ## 0.0.3
1341
+
1342
+ * Introducing `SwiftGenL10nEnumBuilder`
1343
+ * `swiftgen-l10n` CLI
1344
+ * Started playing with `UIColor` enums in the playground
1345
+
1346
+ ## 0.0.2
1347
+
1348
+ * Introducing `SwiftGenStoryboardEnumBuilder` class
1349
+ * `swiftgen-storyboard` CLI
1350
+
1351
+ ## 0.0.1
1352
+
1353
+ Initial version:
1354
+
1355
+ * Mostly testing stuff in a playground
1356
+ * Introducing `SwiftGenAssetsEnumBuilder` class
1357
+ * `swiftgen-assets` CLI