SwiftGen is a tool to automatically generate Swift code for your project resources(such as images, localized strings, etc.). More info in SwiftGen Github.
This repo contains folder with template config and our custom templates for generating extensions of the resources.
- Check if you have Swiftgen installed otherwise run:
brew install swiftgen
- Setup fastlane from the template
- Run:
this will download swiftgen folder into the project root folder
fastlane setup_swiftgen
- Open
swiftgen
folder in the project root folder - Open
swiftgen.yml
file - Change
inputs
paths for the specific resources - Run swiftgen:
swiftgen
If the templates were updated just run:
fastlane update_swiftgen_templates
Open swiftgen
folder and run:
swiftgen
It's going to generate extensions for all defined resources in the swiftlint config.
Sample project in SPM is in the develop branch. If you want to update templates create branch from master without the sample project.