iOSSwiftBoilerplate
iOSSwiftBoilerplate copied to clipboard
Lightweight Boilerplate for iOS project in Swift.
iOSSwiftBoilerplate
Lightweight Boilerplate for iOS project in Swift.
Getting Started
- Download the project as a ZIP.
- This project is setup with Travis CI, you can choose to remove it or keep it.
- To remove it, remove the following files/directory:
-
.travis.yml
-
iOSSwiftBoilerplate.xcodeproj/xcshareddata/
-
- To keep it, make sure you rename all occurences of iOSSwiftBoilerplate to [your_project_name] in the following files:
-
travis.yml
-
iOSSwiftBoilerplate.xcodeproj/xcshareddata/xcschemes/TravisCI.xcscheme
-
- To remove it, remove the following files/directory:
- Rename iOSSwiftBoilerplate to [your_project_name].
- Before opening the workspace, rename all occurences of iOSSwiftBoilerplate to [your_project_name] in the following files:
-
iOSSwiftBoilerplate.xcodeproj/project.pbxproj
-
iOSSwiftBoilerplate.xcworkspace/contents.xcworkspacedata
-
- Rename all directories and files name:
-
iOSSwiftBoilerplate/
->[your_project_name]/
-
iOSSwiftBoilerplate.xcodeproj/
->[your_project_name].xcodeproj/
-
iOSSwiftBoilerplate.xcworkspace/
->[your_project_name].xcworkspace/
-
iOSSwiftBoilerplateTests/
->[your_project_name]Tests/
-
- Open the
[your_project_name].xcworkspace
file with Xcode, rename all occurences of iOSSwiftBoilerplate to [your_project_name] by using the "Find" -> "Find and Replace in Workspace...".
- Before opening the workspace, rename all occurences of iOSSwiftBoilerplate to [your_project_name] in the following files:
- Remove the
Pods/
directory and do apod install
to reflect the new project name. - Lastly, build/run the project and you have a clean workspace to start your project!
Note: If your project's scheme name is not changed, close Xcode and remove the [your_project_name].xcodeproj/xcuserdata/
and [your_project_name].xcworkspace/xcuserdata/
directories and reopen the [your_project_name].xcworkspace
in Xcode.
Features Out-of-the-Box
- CocoaPods is integrated to manage dependencies for your project.
-
SwiftLint is setup in the "Run Script". Make sure to follow the "Installation" -> "Using Homebrew" method.
- You can customize the rules in
.swiftlint.yml
file. To view all the available rulesswiftlint rules
.
- You can customize the rules in
- Quick and Nimble is included for more descriptive unit testing.
- BuildTimeAnalyzer-for-Xcode is configured in the Debug build configuration. You can install this tool to profile the build time of your project. (Note: Make sure you create a scheme with Release build configuration when releasing.)

Project Structure
- Resources: Global constants that are referenced throughout the project such as colors, dimensions, and configurations. Class specific constants should not be stored here to avoid huge constant file.
- Helpers: Helper extensions for existing classes, helper/utility classes.
- Models: Model classes.
- Views: Custom views and its corresponding XIB files is applicable.
- Controllers: View controller classes.
- Support Files: Localization strings and other miscellaneous files (eg. BridgeHeader.h).
Third-Party Libraries
The following is a list of existing third-party libraries.
To add your own third-party library dependencies, simply add it in the Podfile
.
TODOs
- Add a script to easily change iOSSwiftBoilerplate name to any given name