-
Notifications
You must be signed in to change notification settings - Fork 13
Standard File Organization
Su Ho edited this page Aug 11, 2021
·
11 revisions
To keep all current and upcoming iOS projects aligned, we standardize an iOS project’s file organization by following this below structure:
.
├── README.md
├── [Application Name]
│ ├── Configurations
│ │ ├── Plists
│ │ └── XCConfigs
│ ├── Resources
│ │ ├── Assets
│ │ ├── Languages
│ │ └── LaunchScreen
│ └── Sources
│ ├── Application
│ │ ├── AppDelegate.swift
│ │ ├── Application.swift
│ │ └── SceneDelegate.swift
│ ├── Constants
│ │ ├── Constants+API.swift
│ │ └── Constants.swift
│ ├── Data
│ │ ├── Keychain
│ │ │ ├── Keychain.swift
│ │ │ ├── KeychainKey.swift
│ │ │ └── Models
│ │ ├── NetworkAPI
│ │ │ ├── AuthenticatedNetworkAPI.swift
│ │ │ ├── NetworkAPI.swift
│ │ │ ├── Core
│ │ │ ├── Interceptors
│ │ │ ├── Models
│ │ │ └── RequestConfigurations
│ │ └── Repositories
│ │ ├── RepositoryProvider.swift
│ │ ├── Authentication
│ │ └── User
│ ├── Domain
│ │ ├── Entities
│ │ │ ├── User.swift
│ │ │ └── Token.swift
│ │ ├── Interfaces
│ │ │ └── Repositories
│ │ └── UseCases
│ │ ├── UseCaseProvider.swift
│ │ ├── Authentication
│ │ └── User
│ ├── Presentation
│ │ ├── Modules
│ │ │ ├── Home
│ │ │ └── Login
│ │ ├── Navigator
│ │ │ ├── Navigator+Scene.swift
│ │ │ ├── Navigator+Transition.swift
│ │ │ └── Navigator.swift
│ │ └── Views
│ │ ├── Button
│ │ ├── CollectionView
│ │ ├── TextField
│ │ └── Transition
│ └── Supports
│ ├── Builder
│ │ └── Builder.swift
│ ├── Extensions
│ │ ├── Foundation
│ │ ├── Rx
│ │ └── UIKit
│ └── Helpers
│ ├── Rx
│ ├── Typealias
│ └── UIKit
├── [Application Name]Tests
│ ├── Configurations
│ │ └── Info.plist
│ ├── Resources
│ └── Sources
│ ├── Dummy
│ │ ├── Data
│ │ │ └── Models
│ │ ├── Domain
│ │ │ └── Entities
│ │ └── Modules
│ │ └── Home
│ ├── Mocks
│ │ ├── NetworkAPIMock.swift
│ │ └── Sourcery
│ │ ├── AutoMockable.generated.swift
│ │ └── HomeViewModelProtocolMock+Equatable.swift
│ ├── Specs
│ │ ├── Data
│ │ │ └── Repositories
│ │ ├── Domain
│ │ │ └── UseCases
│ │ ├── Presentation
│ │ │ ├── Modules
│ │ │ └── Navigator
│ │ └── Supports
│ │ └── Extensions
│ └── Utilities
│ ├── Data+Decode.swift
│ ├── String+Data.swift
│ └── TestError.swift
└── [Application Name]UITests
├── Configurations
│ └── Info.plist
├── Resources
└── Sources
├── AccessibilityIdentifiers
│ ├── Login
│ └── Home
├── Flows
│ ├── Login
│ └── Home
├── Screens
│ ├── Login
│ └── Home
├── Specs
│ ├── Login
│ └── Home
└── Utilities
├── Data+Decode.swift
├── String+Data.swift
└── TestError.swift
README.md
file is supposed to be the first file that is opened when opening the project.
It is nice to provide developers an overview of the whole project, for example:
- What is the main feature of the project?
- How to set up the project?
- What are project configurations?
This folder contains the main sources of the project. There are 3 sub-folders:
- Configurations: This folder contains only project configurations files, for example,
info.plist
,.xconfig
. - Resources: This folder contains only
resources
files, for example.plist
,.json
,.tff
(fonts),.storyboard
,.strings
,.der
(SSL certificates) - Sources: This folder contains only
.swift
file.
This folder contains the unit testing and integration testing of the main project.
This folder contains the UI testing of the main project.
This project is maintained and funded by Nimble.