MVC, MVP, MVVM, MVVM-C, ReactorKit, VIPER, Clean Architecture
iOS Architectures
Docs
API
Reference
- Started from Pawel Krawiec‘s ios-architecture & Bo-Young PARK‘s BringMyOwnBeer-
- Studied MVVM+RxSwift with Miguel Lin‘s RxSwift-MVVM-Demo
- Studied Coodinator Pattern with wojciech-kulik‘s Swift-MVVMC-Demo
- Studied Clean Architecture with Oleh‘s iOS-Clean-Architecture-MVVM
Thank for people of this list!
Screenshots
List | Search | Random |
---|---|---|
Concept
Environment
Swift 5, Xcode 12.5
0. Shared
Image Download – Kingfisher
Package Management – Cocoapods
$ pod install
1. Objc-MVC
UI – Storyboard
Image – NSCache
Network – NSData to Json
1. MVC – storyboard
UI – Storyboard
Network – URLSession
2. MVC – snapKit
UI – SnapKit
Network – URLSession
3. MVP – snapKit
UI – SnapKit, Then
Network – URLSession
4. MVVM – RxSwift – storyboard
UI – Storyboard, RxDatasource
Network – RxURLSession
Unit Tests
?
– RxTest
4-1. MVVM – RxSwift – xcodegen
UI – Storyboard, RxDatasource
Network – RxURLSession
Unit Tests
?
– RxTest
Xcodegen
?
$ brew install xcodegen
$ cd MVVM-RxSwift-xcodegen/
$ xcodegen
4-2. MVVM – RxSwift – tuist
UI – Storyboard, RxDatasource
Network – RxURLSession
Unit Tests
?
– RxTest
Tuist
?
<div class="snippet-clipboard-content position-relative" data-snippet-clipboard-copy-content="$ bash
$ bash <(curl -Ls https://install.tuist.io)
$ cd MVVM-RxSwift-tuist/
$ tuist generate
4-3. CocoaPods, SPM, Carthage + Rome
SPM,
- Rome, Carting, Fastlane
$ chmod +x carthage.sh
$ ./carthage.sh update --platform iOS
Reference
5. MVVM – RxSwift – snapKit
UI – SnapKit, Then, RxDatasource
Network – Moya
Unit Tests
?
– RxTest
5-1. MVVM – RxSwift – coreData
UI – SnapKit, Then, RxDatasource
Network – RxURLSession
Repositoy Pattern – CoreData
Unit Tests
?
– RxTest, Nimble
5-2. MVVM – RxSwift – realm
UI – SnapKit, Then, RxDatasource
Network – RxURLSession
Repositoy Pattern – Realm
Unit Tests
?
– RxTest, Nimble
5-3. MVVM – RxSwift – sqlite
UI – SnapKit, Then, RxDatasource
Network – RxURLSession
Repositoy Pattern – Sqlite3
Unit Tests
?
– RxTest, Nimble
5-4. Clean Architecture – MVVM – RxSwift – coredata
5-1. MVVM – RxSwift – coreData to Clean Architecture
6. MVVM-C – RxSwift
UI – SnapKit, Then, RxDatasource
Network – Moya
Unit Tests
?
– RxTest, Nimble, Quick
CI – Github Actions
?
6-1. MVVM-C – RxSwift – Swinject
UI – SnapKit, Then, RxDatasource
Network – Moya
Unit Tests
?
– RxTest, Nimble, Quick
CI – Github Actions
?
DI – Swinject
7. MVVM – RxSwift – RxFlow
UI – SnapKit, Then, RxDatasource
Network – Moya
Unit Tests
?
– RxTest
❗️
Alert : I used ‘ DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) ‘ Because If tabbarflow does not navigate to a total of 3 flows, it cannot navigate to an alert. If you know a better solution, please PR!
7-1. Clean Architecture – RxFlow – Swinject
❗️
Alert : I used ‘ DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) ‘ Because If tabbarflow does not navigate to a total of 3 flows, it cannot navigate to an alert. If you know a better solution, please PR!
8. ReactorKit – RxFlow
UI – SnapKit, Then, RxDatasource
Network – Moya
Unit Tests
?
❗️
Alert : I used ‘ DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) ‘ Because If tabbarflow does not navigate to a total of 3 flows, it cannot navigate to an alert. If you know a better solution,
9. VIPER + Rx
UI – SnapKit, Then, RxDatasource
Network – Moya
Unit Tests
?
– RxTest
VIPER Template – VIPER + Rx Xcode Template
10. RIBs + Rx
Package Management – SPM
UI – SnapKit, Then, RxDatasources
Network – Moya
Unit Tests
?
Reference
1. SwiftUI- MV
Using @State only
Network – Moya
2. SwiftUI-MVVM
Using @Published
Network – Moya
Unit Tests
?
3. SwiftUI-MVVM-Combine
Using Combine’s PassthroughSubject
Network – Moya
Unit Tests
?
3-1. Clean Architecture – MVVM – Combine
Using Combine’s PassthroughSubject
Network – Moya
Unit Tests
?