Skip to content

Commit 24354c0

Browse files
committed
re-add xcode link, add MG overview at top
1 parent 697e4a9 commit 24354c0

File tree

4 files changed

+22
-8
lines changed

4 files changed

+22
-8
lines changed

Documentation/Articles/Xcode-Integration.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ To integrate SwiftGen directly in an Xcode project, and make it generate the fil
44

55
## Adding SwiftGen as a Run Script Phase
66

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:
810

911
* Select the project in the Project Navigator on the left of your Xcode window
1012
* Select your App Target in the list

Documentation/MigrationGuide.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff 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+
113
# SwiftGen 6.0 Migration Guide
214

315
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
1527

1628
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).
1729

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).
1931

2032
### Storyboards template has been split into scenes and segues templates
2133

@@ -112,7 +124,7 @@ There have been a few minor context changes, see [SwiftGenKit's own Migration Gu
112124

113125
## Template functionality changes
114126

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.
116128

117129
</details>
118130

@@ -155,18 +167,18 @@ Instead, you're now **required** to provide a template when invoking SwiftGen, e
155167

156168
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)
157169

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.
159171

160172
📖 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.
161173
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.
162174

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.
164176

165177
### Breaking template functionality changes
166178

167179
❗️ 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.
168180

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:
170182

171183
```swift
172184
StoryboardScene.Message.instantiateMessageList()

Documentation/SwiftGenKit Contexts/InterfaceBuilder.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Input
44

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.
66

77
## Output
88

Documentation/SwiftGenKit Contexts/Strings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Input
44

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.
66

77
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:
88

0 commit comments

Comments
 (0)