Supercharge Swift with SwiftGen

The Swift code generation tool for colors, images, strings & more!

let image = Image("my-cool-image") // Stop doing this 😡
// swiftgen.ymlxcassets:
- YourProjectName/Assets.xcassets // 1
templateName: swift5 // 2
output: ProjectName/Assets.swift // 3
generated swift code, ty swiftgen!
let image = Image(Asset.myCoolImage) // Do this 😎
// swiftgen.ymlstrings:
inputs: TemplateProject/Localizable.strings // 1
- templateName: structured-swift5
output: TemplateProject/Generated/Strings.swift
var body: some View {
Text(L10n.Onboarding.Buttons.join) // 🎉

⚠️ You can also concatenate Strings if they are dynamic using %@ in the Localizable.strings file.

- YourProjectName/Assets.xcassets
templatePath: xcassets-swiftui.stencil // 1
output: ProjectName/Assets.swift
var body: some View {
.cornerRadius(10) // this compiles
🔊 audio narration

Shameless plug: if you enjoyed this check my Patreon or YouTube for tutorials and posts I make around Swift and swe’ing in general 😎

iOS Software Engineer ⚡️ Creator

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store