From e6c4a57f088229f23ffdcfd8d7a555086a9a7a38 Mon Sep 17 00:00:00 2001 From: Bliss Pisit Wetcha Date: Fri, 6 Oct 2023 11:06:29 +0700 Subject: [PATCH] [#530] Add SwiftUI file organization wiki --- .github/wiki/Standard-File-Organization.md | 74 +++++++++++++++++----- 1 file changed, 59 insertions(+), 15 deletions(-) diff --git a/.github/wiki/Standard-File-Organization.md b/.github/wiki/Standard-File-Organization.md index 762f7cb9..c0677c91 100644 --- a/.github/wiki/Standard-File-Organization.md +++ b/.github/wiki/Standard-File-Organization.md @@ -2,6 +2,8 @@ To keep all current and upcoming iOS projects aligned, we standardize an iOS project’s file organization by following this below structure: +### Common + ``` . ├── README.md @@ -15,9 +17,7 @@ To keep all current and upcoming iOS projects aligned, we standardize an iOS pro │   │   └── LaunchScreen │   └── Sources │   ├── Application -│   │   ├── AppDelegate.swift -│   │   ├── Application.swift -│   │   └── SceneDelegate.swift +│   │   └── Varies by UI Interface │   ├── Constants │   │   ├── Constants+API.swift │   │   └── Constants.swift @@ -49,18 +49,7 @@ To keep all current and upcoming iOS projects aligned, we standardize an iOS pro │   │   ├── Authentication │   │   └── User │   ├── Presentation -│   │   ├── Modules -│   │   │   ├── Home -│   │   │   └── Login -│   │   ├── Navigator -│   │   │   ├── Navigator+Scene.swift -│   │   │   ├── Navigator+Transition.swift -│   │   │   └── Navigator.swift -│   │   └── Views -│   │   ├── Button -│   │   ├── CollectionView -│   │   ├── TextField -│   │   └── Transition +│   │   └── Varies by UI Interface │   └── Supports │   ├── Builder │   │   └── Builder.swift @@ -91,6 +80,7 @@ To keep all current and upcoming iOS projects aligned, we standardize an iOS pro │   │   └── HomeViewModelProtocolMock+Equatable.swift │   ├── Specs │   │   ├── Data +│   │   │   └── Datasources │   │   │   └── Repositories │   │   ├── Domain │   │   │   └── UseCases @@ -123,6 +113,60 @@ To keep all current and upcoming iOS projects aligned, we standardize an iOS pro    └── KIF+Swift.swift ``` +### SwiftUI + +``` +. +└── {ProjectName} +    └── Sources +    ├── Application +    │   ├── {ProjectName}App.swift +    │   └── AppDelegate.swift +    └── Presentation +       ├── Models +            │   └── ProductUIModel.swift +       ├── Coordinators +            │   └── AppCoordinator.swift +       ├── Modules +       │   ├── Home +       │   └── Login +       ├── Styles +       │   └── RoundedButtonStyle.swift +       ├── ViewModifiers +       │   └── View+PrimaryNavigationBar.swift +       ├── Views +       │   └── SearchBarView.swift +       └── ViewIds +          └── ViewId.swift +``` + +### UIKit + +``` +. +└── {ProjectName} +    └── Sources +    ├── Application +    │   ├── AppDelegate.swift +    │   ├── Application.swift +    │   └── SceneDelegate.swift +    └── Presentation +       ├── Modules +       │   ├── Home +       │   └── Login +       ├── Navigator +       │   ├── Navigator+Scene.swift +       │   ├── Navigator+Transition.swift +       │   └── Navigator.swift +       └── Views +       │ ├── Button +       │ ├── CollectionView +       │ ├── TextField +       │ └── Transition +       └── ViewIds +          └── ViewId.swift +``` + ## README.md `README.md` introduces the overview of the project, for example: