Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#530] Update Standard File Organization Wiki #532

Merged
merged 3 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 59 additions & 17 deletions .github/wiki/Standard-File-Organization.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -49,27 +49,14 @@ 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
│   ├── Extensions
│   │   ├── Foundation
│   │   ├── Rx
│   │   └── UIKit
│   └── Helpers
│   ├── Rx
│   ├── Typealias
│   └── UIKit
├── {ProjectName}Tests
Expand All @@ -91,6 +78,7 @@ To keep all current and upcoming iOS projects aligned, we standardize an iOS pro
│   │   └── HomeViewModelProtocolMock+Equatable.swift
│   ├── Specs
│   │   ├── Data
│   │   │   └── Datasources
│   │   │   └── Repositories
│   │   ├── Domain
│   │   │   └── UseCases
Expand Down Expand Up @@ -123,6 +111,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:
Expand Down
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ gem "danger-swiftlint"
gem "danger-xcode_summary"
gem 'danger-swiftformat'
gem 'danger-xcov'
# Fix issue with Cocoapods 13.0 when activesupport is 7.1.0
gem 'activesupport', '~> 7.0.0', '>= 7.0.8'

plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)
3 changes: 0 additions & 3 deletions Tuist/Interfaces/UIKit/Project/.sourcery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,3 @@ output:
args:
autoMockableTestableImports:
- {PROJECT_NAME}
autoMockableImports:
- RxSwift
- RxCocoa