Add this package to your project dependencies. Select a target and open the Build Phases inspector. Open Run Build Tool Plug-ins and add SwiftGenBuildPlugin from the list.
SwiftGen config
Plugin look for a swiftgen.yml configuration file in the root of your package (in the same folder as Package.swift) and in the target’s folder. If files are found in both places, the file in the target’s folder is preferred.
The paths in the configuration depend on where it is located:
Root configuration requires a full path to resources. You can set ${TARGET_NAME} instead of a specific target name, such as Sources/${TARGET_NAME}/Resources/en.lproj/Localizable.strings
Target configuration requires a relative path to resources
SwiftGenPlugin
A Swift Package Manager Plugin for SwiftGen that will run it before each build
SwiftGen has its own implementation
Add to Package
Add the package as a dependency to your
Package.swift:Then add
SwiftGenPluginplugin to your targets:Add to Project
Add this package to your project dependencies. Select a target and open the
Build Phasesinspector. OpenRun Build Tool Plug-insand addSwiftGenBuildPluginfrom the list.SwiftGen config
Plugin look for a
swiftgen.ymlconfiguration file in the root of your package (in the same folder asPackage.swift) and in the target’s folder. If files are found in both places, the file in the target’s folder is preferred.The paths in the configuration depend on where it is located:
${TARGET_NAME}instead of a specific target name, such asSources/${TARGET_NAME}/Resources/en.lproj/Localizable.stringsAuthor
Maxim Shurkin
License
SwiftGenPlugin is released under the MIT license. See LICENSE file for more info.