Awesome Open Source
Awesome Open Source

Template iOS App using Clean Architecture and MVVM   CI

iOS Project implemented with Clean Layered Architecture and MVVM. (Can be used as Template project by replacing item name “Movie”). More information in medium post: Medium Post about Clean Architecture + MVVM

Alt text

Layers

  • Domain Layer = Entities + Use Cases + Repositories Interfaces
  • Data Repositories Layer = Repositories Implementations + API (Network) + Persistence DB
  • Presentation Layer (MVVM) = ViewModels + Views

Dependency Direction

Alt text

Note: Domain Layer should not include anything from other layers(e.g Presentation — UIKit or SwiftUI or Data Layer — Mapping Codable)

Architecture concepts used here

Includes

  • Unit Tests with Quick and Nimble, and View Unit tests with iOSSnapshotTestCase
  • Unit Tests for Use Cases(Domain Layer), ViewModels(Presentation Layer), NetworkService(Infrastructure Layer)
  • UI test with XCUITests
  • Size Classes and UIStackView in Detail view
  • Dark Mode
  • SwiftUI example, demostration that presentation layer does not change, only UI (at least Xcode 11 required)
  • Pagination

Networking

If you would like to use Networking from this example project as repo I made it availabe here

Requirements

  • Xcode Version 11.2.1+ Swift 5.0+

How to use app

To search a movie, write a name of a movie inside searchbar and hit search button. There are two network calls: request movies and request poster images. Every successful search query is stored persistently.

Alternatives To Ios Clean Architecture Mvvm
Select To Compare


Alternative Project Comparisons
Related Awesome Lists
Top Programming Languages
Top Projects

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Swift (66,760
Xcode (12,408
Presentation (10,235
Mvvm (5,189
Viewmodel (2,402
Swiftui (2,395
Mvvm Architecture (1,404
Ios Swift (1,093
Dto (753
Mvvm Ios (22