A simple, ugly, very contrived sample application for my "Tips, Tricks (and little things you (might've) missed) About iOS Development" talk given at the MSP Mobile Talks user group meeting on 02/06/2024. The slides for the presentation are also included here.
The project is configured with the following tools and utilites for demonstration purposes:
- XcodeGen - configuration file project.yml
- SwiftGen - configuration file swiftgen.yml
- SwiftLint - configuration file .swiftlint.yml
It also provides examples of how to switch back to full Info.plist files and disable the automatic type generation of Image and Color assets in Xcode 15 to work properly with XcodeGen and SwiftGen.
- Make sure you have XcodeGen installed.
brew install xcodegen
- Clone the repository.
- Change directory to the top of the project (where the project.yml is).
- Run
xcodegen generate
, build and launch.
- Check out branch with second page and other file and group changes.
git checkout smccoole/second-page
- Re-run
xcodegen generate
to update Xcode's project.pbxproj. - Build and run as usual.
- The files created by SwiftGen are under the
HelloSpace/Generated
folder. Thesmccoole/second-page
branch includes the addtion of Fonts so be sure to check that out. - You can see examples of how the type safe definitions created by SwiftGen are used in the views.
- If you make changes to the Fonts, Assets or Localizable.strings file, you must first run a build before trying to use the new or updated enumerations because SwiftGen is run in the pre-build and must update the generated files.