Generate all sorts of configuration files from a single Swift script.
The goal is to create a Swift script file that will contain all the settings for the repo (Swift version number, product name, company name, author(s) name, company prefix, project and target(s) names(s), etc.) and which you can run on demand to generate and re-generate all sorts of infrastructure / settings / configuration files for the repo (gitignore, Fastfile, Podfile, etc.), to easily keep them all up to date and in coherence with each other.
Note, that you might want to write some files only once during the repo lifetime (in the beginning), but in most cases it is supposed that all those files described in the config should be kept up to date only via this config. So whenever you want to rename the product or change any of it's settings, or add a CocoaPods dependency — those fixes should be done in the config script and then entire script should be executed to regenerate everything. This way we always can guarantee that everything is up to date and in sync with each other, plus it's super easy to review all settings in one place.
For usage in Swift script (recommended)
For usage in Xcode Playgrounds (via Carthage)
XCERepoConfigurator can be also used in Xcode Playgrounds. Install it as dependency via Carthage, just add to
Cartfile the following.
After fetching dependencies with
Carthage, add both
RepoConfigurator.xcodeproj and playground(s) to the same workspace.
Most of the initializers have some parameters with default values, look into sources to discover all available parameters to configure output file according to your needs.
When define Xcode project target (for Struct project spec file), don't forget to set following build settings.
SWIFT_VERSIONon project level;
DEVELOPMENT_TEAMwith development team ID;
INFOPLIST_FILEwith relative path to corresponding info plist file;