iOS Project Template for SwiftUI

IDE Language Platform Build Status

Project template to jumpstart your next iOS project with integrating best practices and tools.

Motivation

Everytime we create a new project, we do lots of repeated tasks that kills our effective hours. This template will save those hours and help to follow standard project architecture.

Best Practices

  • Composable Architecture TCA/Composable Architecture of iOS app using Combine and SwiftUI
  • R.swift Get strong typed, autocompleted resources like images, fonts and segues in Swift projects
  • Standard gitignore
  • Moya for netwoking layer
  • Swift-Format [For doing code formatting transformations]
  • Development, Staging and Production app flavours
  • Separate build configuration for each flavour

Todo

  • Base classes for handling deeplink, notifications and multiple scheme

Supporting Tools

Xcode 14.0 or later and Swift 5.5 or later.

Prerequisites:

Install cookiecutter by runing below terminal command.

brew install cookiecutter

Usage

The project template uses Cookiecutter to create your project from it. Run the below command to create your project:

cookiecutter git@github.com:monstar-lab-oss/swiftui-template-tca.git

Enter your desire app name followed by company name. Thats it, you should be able to see your app directory created based on the template.

Build Configurations

The templete used .xcconfig and BuildConfiguration.plist files to maintain different environments(Development/Staging/Production). To know how it is done please follow the link.

Additional configuration

You will have to manually configure the bundle id of the main target and test target.

TCA Template Installation

All the Xcode custom template files are located in ~/Library/Developer/Xcode/Templates/ and grouped into sections by folder name. Create a folder with name Custom Templates manually or by running the following command from the terminal:

mkdir ~/Library/Developer/Xcode/Templates/Custom Templates

Now drag and drop the TCA.xctemplate that included with the repo to the Custom Templates directory. Now the TCA template can be selected from File Templates

Contributing Code

Please refer to Contributing Guidelines before participating.

Acknowledgments

👥 Credits

Made with ❤️ at Monstarlab