Organize Xcode groups first by feature and then by architecture component, if needed.
The following example shows a project structure with three top level directories consisting of one feature directory and two application-related directories.
-
Every file should exist within an Xcode group, categorized first by feature, with exceptions listed below:
- The
Application
group is a special case that is neither a feature nor an architecture component. This group should contain files associated with the application entry point, such asMain.storyboard
andAppDelegate.swift
. - The
Resources
group houses supporting files to the main application that are more static in nature. This group should contain files likeInfo.plist
,Assets.xcassets
, andLaunchScreen.storyboard
.
- The
-
The above
Checkout
group is a feature that has its files distributed into groups related to its architecture. -
When a feature group grows to contain more than five files consider adding sub-groups to categorize the files by architecture component, e.g.
Models
,Views
,Controllers
, etc.