You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Documentation/Articles/Xcode-Integration.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,9 @@ To integrate SwiftGen directly in an Xcode project, and make it generate the fil
4
4
5
5
## Adding SwiftGen as a Run Script Phase
6
6
7
-
To add a build phase to your target, follow these steps:
7
+
You can read [Apple's dedicated documentation which explains how to add a Run Script Phase (with illustrations) here](https://help.apple.com/xcode/mac/10.0/index.html?localePath=en.lproj#/devc8c930575).
8
+
9
+
In short, it consists of these steps:
8
10
9
11
* Select the project in the Project Navigator on the left of your Xcode window
Copy file name to clipboardExpand all lines: Documentation/MigrationGuide.md
+17-5Lines changed: 17 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,15 @@
1
+
2
+
# Migration Guides
3
+
4
+
All the migration guides for SwiftGen are spread out over a few files, depending on the target audience.
5
+
6
+
| Migration Guide | Target Audience | Abstract |
7
+
|-----------------|-----------------|---------|
8
+
| SwiftGen Migration Guide (this file) | All users of SwiftGen | Changes in configuration, CLI parameters and global changes overview |
9
+
|[Templates Migration Guide](templates/MigrationGuide.md)| Users of SwiftGen's bundled templates (`templateName` option) | Some templates may have been renamed, removed or merged, or their functionality may have changed |
10
+
|[SwiftGenKit Migration Guide](SwiftGenKit Contexts/MigrationGuide.md) | Template writers | Changes in names of variables provided by SwiftGenKit to your templates |
11
+
|[StencilSwiftKit Migration Guide](https://github.com/SwiftGen/StencilSwiftKit/blob/master/Documentation/MigrationGuide.md)| Template writers | Changes in extra filters and tags for use in templates |
12
+
1
13
# SwiftGen 6.0 Migration Guide
2
14
3
15
If you're migrating from SwiftGen 5.x to SwiftGen 6.0, there might be some migration steps you'll need to use.
@@ -15,7 +27,7 @@ You should replace invocations in your config files with the new `ib` command na
15
27
16
28
We've (finally) removed the bundled `swift2` templates. These have been deprecated for a while and were not being tested, so we're dropping them with this release. We assume most of you are already developing in a newer version of Swift (3 or 4).
17
29
18
-
A few minor template functionality changes have been made, mostly cleaning up some old code and old behaviours. The `xcassets` templates now support `NSDataAssets`, and they will now only group assets if the "Provides Namespace" checkbox is ticked for a group (you can change back to the old behaviour if needed). You can read more about it in the [templates Migration Guide](Templates/MigrationGuide.md#swiftgen-60-migration-guide).
30
+
A few minor template functionality changes have been made, mostly cleaning up some old code and old behaviours. The `xcassets` templates now support `NSDataAssets`, and they will now only group assets if the "Provides Namespace" checkbox is ticked for a group (you can change back to the old behaviour if needed). You can read more about it in the [templates Migration Guide](templates/MigrationGuide.md#swiftgen-60-migration-guide).
19
31
20
32
### Storyboards template has been split into scenes and segues templates
21
33
@@ -112,7 +124,7 @@ There have been a few minor context changes, see [SwiftGenKit's own Migration Gu
112
124
113
125
## Template functionality changes
114
126
115
-
Only a small change in the generated code that'll affect a tiny subset of users: the `allValues` variable has been deprecated. See the [templates Migration Guide](Templates/MigrationGuide.md#functionality-changes-in-21-swiftgen-51) for more information.
127
+
Only a small change in the generated code that'll affect a tiny subset of users: the `allValues` variable has been deprecated. See the [templates Migration Guide](templates/MigrationGuide.md#functionality-changes-in-21-swiftgen-51) for more information.
116
128
117
129
</details>
118
130
@@ -155,18 +167,18 @@ Instead, you're now **required** to provide a template when invoking SwiftGen, e
155
167
156
168
Some templates bundled with SwiftGen have been **renamed** to have a better naming consistency. Some others have been **removed** or **merged with others** (for example the storyboard templates between iOS & macOS are now merged into a single one compatible with both platforms, other templates now use the `--param` feature to be customizable, removing the need to maintain 2 separate templates for some variants)
157
169
158
-
Be sure to consult the [templates Migration Guide](Templates/MigrationGuide.md#templates-20-migration-guide) to see the list of changes (renamings or removal) in templates bundled in SwiftGen.
170
+
Be sure to consult the [templates Migration Guide](templates/MigrationGuide.md#templates-20-migration-guide) to see the list of changes (renamings or removal) in templates bundled in SwiftGen.
159
171
160
172
📖 Also, **each template bundled in SwiftGen has a dedicated documentation now**, listing what the template is for, what does the generated code looks like, when you might want to choose that template over another one, and the parameters (`--param X=Y`) supported by this template for customization via the command line.
161
173
This should help you choose the right template to use for your use case (or help you decide if you need to create your own if none of the provided ones fit your needs) and see what's customizable for each.
162
174
163
-
📖 See [the dedicated documentation folder](Templates) for those templates documentation. This folder is organized the same way the templates are: one subfolder for each SwiftGen command (`colors`, `strings`, …), then one markdown file for each template name.
175
+
📖 See [the dedicated documentation folder](templates) for those templates documentation. This folder is organized the same way the templates are: one subfolder for each SwiftGen command (`colors`, `strings`, …), then one markdown file for each template name.
164
176
165
177
### Breaking template functionality changes
166
178
167
179
❗️ The code generated by the `storyboards` templates is **not** backward compatible with the one generated by SwiftGen 4.x. This means that you'll need to adapt your codebase and call sites accordingly.
168
180
169
-
Please read the [templates migration guide](Templates/MigrationGuide.md#functionality-changes-in-20-swiftgen-50) for more information, which includes a compatibility template. Essentially, you need to change calls like the following line:
181
+
Please read the [templates migration guide](templates/MigrationGuide.md#functionality-changes-in-20-swiftgen-50) for more information, which includes a compatibility template. Essentially, you need to change calls like the following line:
Copy file name to clipboardExpand all lines: Documentation/SwiftGenKit Contexts/InterfaceBuilder.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
## Input
4
4
5
-
The interface builder parser accepts either a file or a directory, which it'll search for `storyboard` files. The parser will load all the scenes and all the segues for each storyboard. It supports both AppKit (macOS) and UIKit (iOS, watchOS, tvOS) storyboards.
5
+
The interface builder parser accepts either a file or a directory, which it'll search for `storyboard` files. The parser will load all the scenes and all the segues for each storyboard. It supports both AppKit (macOS) and UIKit (iOS, watchOS, tvOS) storyboards.
Copy file name to clipboardExpand all lines: Documentation/SwiftGenKit Contexts/Strings.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
## Input
4
4
5
-
The strings parser accepts a `strings` file, typically `Localizable.strings`. It will parse each string in this file, including the type information for formatting parameters.
5
+
The strings parser accepts a `strings` file, typically `Localizable.strings`. It will parse each string in this file, including the type information for formatting parameters.
6
6
7
7
The strings file will be converted into a structured tree version, where each string is separated into components by the `.` character. We call this the `dot syntax`, each component representing a level. For example, the following strings:
0 commit comments