All Projects â†’ huynguyencong â†’ SwiftUI-MVVM-C

huynguyencong / SwiftUI-MVVM-C

Licence: MIT license
An iOS template project using SwiftUI, Combine and MVVM-C software architecture

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to SwiftUI-MVVM-C

Observable
A generic ObservableObject for every property!
Stars: ✭ 41 (-51.76%)
Mutual labels:  combine, swiftui
LongWeekend-iOS
🏖📱 LongWeekend is iOS Application that supports checking long weekends when taking a vacation in Japan
Stars: ✭ 19 (-77.65%)
Mutual labels:  combine, swiftui
Simple-Login-iOS
iOS client for SimpleLogin
Stars: ✭ 62 (-27.06%)
Mutual labels:  combine, swiftui
iOS-App
🕹ī¸ iOS application of HardcoreTap game
Stars: ✭ 17 (-80%)
Mutual labels:  combine, swiftui
Shift
Light-weight EventKit wrapper.
Stars: ✭ 31 (-63.53%)
Mutual labels:  combine, swiftui
JewelCase
This is the source code for JewelCase, a sample app demonstrating how to use SwiftUI and Firebase together. This slide deck discusses the architecture of the app: https://www.slideshare.net/peterfriese/building-swiftui-apps-with-firebase
Stars: ✭ 42 (-50.59%)
Mutual labels:  combine, swiftui
RealmTaskTracker
SwiftUI version of the MongoDB Realm iOS tutorial
Stars: ✭ 24 (-71.76%)
Mutual labels:  combine, swiftui
Swiftui Tutorials
A code example and translation project of SwiftUI. / 一ä¸Ē SwiftUI įš„į¤ē䞋、įŋģč¯‘įš„æ•™į¨‹éĄšį›Žã€‚
Stars: ✭ 1,992 (+2243.53%)
Mutual labels:  combine, swiftui
CoordinatorSwiftUI
A simple project to test the implementation of Coordinator Pattern using SwiftUI.
Stars: ✭ 28 (-67.06%)
Mutual labels:  combine, swiftui
swiftui-mapkit
SwiftUI meets MapKit
Stars: ✭ 17 (-80%)
Mutual labels:  combine, swiftui
99StocksSwiftUI
SwiftUI app that fetches a list of companies, sort them by their share price and can show its details on a separate view
Stars: ✭ 34 (-60%)
Mutual labels:  combine, swiftui
Project01-C-User-Event-Collector
💜🎷 네ė´ë˛„ VIBE ė‚ŦėšŠėž ė´ë˛¤íŠ¸ ėˆ˜ė§‘기 🎷💜
Stars: ✭ 21 (-75.29%)
Mutual labels:  combine, swiftui
SwiftReactor
A protocol which should help structure your data flow in SwiftUI (and UIKit).
Stars: ✭ 57 (-32.94%)
Mutual labels:  combine, swiftui
Surround
A modern iOS app for playing Go on the Online Go Server (OGS)
Stars: ✭ 29 (-65.88%)
Mutual labels:  combine, swiftui
clouds
đŸŒĻ A weather app for iOS, written in SwiftUI.
Stars: ✭ 26 (-69.41%)
Mutual labels:  combine, swiftui
stinsen
Coordinators in SwiftUI. Simple, powerful and elegant.
Stars: ✭ 563 (+562.35%)
Mutual labels:  coordinator, swiftui
E-Rezept-App-iOS
https://gematik.github.io/E-Rezept-App-iOS/
Stars: ✭ 76 (-10.59%)
Mutual labels:  combine, swiftui
Weather
A simple SwiftUI weather app using MVVM.
Stars: ✭ 23 (-72.94%)
Mutual labels:  combine, swiftui
CombineUnsplash
A sample project exploring MVVM pattern with SwiftUI/Combine, using Unsplash API (via Picsum.photos API)
Stars: ✭ 25 (-70.59%)
Mutual labels:  combine, swiftui
NetworkImage
Asynchronous image loading in SwiftUI
Stars: ✭ 39 (-54.12%)
Mutual labels:  combine, swiftui

SwiftUI-MVVM-C

A template project that uses SwiftUI for UI, Combine for event handling, MVVM-C for software architecture.

I have done some small projects using SwiftUI. It is really cool, simple and fast, but also have some thing need to be improved, that surely will be improved by Apple in the future. After that, I have been improving the project structure little by little, restructure it with the MVVM-C architecture, what I have used in most UIKit projects before. Today, I am publishing a simple project, that conclude what I have learned, used in my SwiftUI projects.

Demo

Compatibility

  • iOS 14 and later
  • SwiftUI 2 and later
  • Swift 5 and later

Project overview

The project uses the GitHub API to load a repo list of a user, show repo details when users tap on a repo. You can also tap on the top right icon to see user's profile. In this project, it is showing my repos. You can change it in the username static constant in ContentView view.

The project uses MVVM-C (aka Model - View - ViewModel - Coordinator). Why is there Coordinator here? The Coordinator is an additional part for the MVVM, that help to separate navigation handling code to a different place, instead of putting it in the View (or View Controller in UIKit). It makes the view (or view controller in UIKit) more reusable, smaller. In my SwiftUI projects, Coordinator is a View, but only for handling navigation event purpose.

What you can find in this project

  • MVVM-C implement with SwiftUI and Combine framework.
  • Networking with Combine framework, written in the way that help to test it, and integrate other 3rd parties API easily.
  • Unit test: Mock network data, view model test, dependency injection, etc.
  • Some useful extensions.
  • Structure of a SwiftUI project.

Project structure

Project structure

License

Copyright huynguyencong, Licensed under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].