A sample app that implements MVVM architecture using Swift, ViewModel, Alamofire

Overview

MVVM Architecture Android: Template

This repository contains a sample app that implements MVVM architecture using Swift, ViewModel, Alamofire, and etc.

The app has following packages:

  1. Model: It simply holds the data and has nothing to do with any of the business logic. They’re usually structs or simple classes.

  2. ViewController: The ViewController contains the View and owns the Model.

  3. ViewModel: It acts as the bridge between the Model & View. The ViewModel will handle most if not all of the view’s display logic. ViewModels are usually classes, so they can be passed around as references.

  4. Network: A class to handle the APIs requests.

  5. Constats: Class contains all the constants used inside the project.

  6. Cell: Views for the reusable cells.

  7. UnitTests: samples for unit tests cases.

Schemes:

The project contains two schemes:

  1. MVVM Template Dev: For development environment.
  2. MVVM Template Prod: For the production environment.

You can setup the URLs for each environment in the AppDelegate class:

Requirements

  • Xcode 11.3+
  • Swift 5.0+

Installation

Before running the project you will need to enter these lines in your terminal

cd path_to_project
pod install

In case you don't have pod installed in your mac, please refer to this link: https://medium.com/@soufianerafik/how-to-add-pods-to-an-xcode-project-2994aa2abbf1

To generate classes from json response:

https://app.quicktype.io/

You might also like...
Sample iOS integration project

Sample integration of SweeprMobile SDK To quickly build the app: Fill-in the URLs and passwords inside env-default file Generate BuildConfig.swift bas

GraphQL based Jetpack Compose, Wear Compose and SwiftUI Kotlin Multiplatform sample
GraphQL based Jetpack Compose, Wear Compose and SwiftUI Kotlin Multiplatform sample

GraphQL based Jetpack Compose, Wear Compose and SwiftUI Kotlin Multiplatform sample

Kotlin Multiplatform sample with SwiftUI and Compose (Desktop and Android) clients. Heavily inspired by Wordle game.
Kotlin Multiplatform sample with SwiftUI and Compose (Desktop and Android) clients. Heavily inspired by Wordle game.

WordMasterKMP Kotlin Multiplatform sample heavily inspired by Wordle game and also Word Master and wordle-solver samples. The main game logic/state is

Stay - a local userscript manager and an extension sample for Safari on iOS/iPadOS
Stay - a local userscript manager and an extension sample for Safari on iOS/iPadOS

Stay - a local userscript manager and an extension sample for Safari on iOS/iPadOS

A starter project for Sample Project in Objective C.

A starter project for Sample Project in Objective C.

KMM-Sample

KMM-Sample KMM-Sample 1- Shared Module open shared module using android studio , write your code , business logic. build android aar file: open termin

Crypto & Portfolio Track SwiftUI - macOS 13 Ventura & iOS 16 & watchOS 9 - MVVM
Crypto & Portfolio Track SwiftUI - macOS 13 Ventura & iOS 16 & watchOS 9 - MVVM

CryptoTrackMultiPlatformSwiftUI In this SwiftUI project, I developed a multiplatform app using as many new features as possible in the latest OS versi

A compiler, assembler and emulator for the QCPU 2 architecture

QCPU CLI A CLI for compiling Q-code, assembling extended QCPU 2 assembly and emulating machine code. Tags @PAGE upper lower @HEADER label argum

A demo project with VIPER architecture
A demo project with VIPER architecture

AQIDemo What is it? A demo project with VIPER architecture. All views, Interactors Presenter and routers are in place with their respective folder. Ap

Owner
null
iOS architectures - MVC, MVP, MVVM, MVVM-C, ReactorKit, VIPER, Clean Architecture

iOS architectures - MVC, MVP, MVVM, MVVM-C, ReactorKit, VIPER, Clean Architecture, RIBs; Repository Pattern, Rxflow, Swinject, Tuist, Xcodegen, Cocoapods, SPM, Carthage + Rome

null 123 Dec 21, 2022
React Native library that implements PayPal Checkout flow using purely native code (swift).

react-native-paypal-swift React Native library that implements PayPal Checkout flow using purely native code (swift). Installation npm install react-n

Tibb 6 Nov 28, 2022
Wiggles-iOS - Beautiful Puppy adoption app built to Demonstrate the SwiftUI and MVVM Architecture

Wiggles ?? Beautiful Puppy adoption app built to Demonstrate the use of SwiftUI

Sameer Nawaz 186 Dec 18, 2022
Strucure: I used MVVM with Colusre binging modular architecture : Also I used openweathermap to get all information for current weather as it's easy t

Strucure: I used MVVM with Colusre binging modular architecture : Also I used openweathermap to get all information for current weather as it's easy t

Alaa Azab 0 Oct 7, 2021
Swift sample app for running privileged operations on macOS using a helper tool

SwiftAuthorizationSample demonstrates how to run privileged operations on macOS using a helper tool managed by launchd. This sample was created with t

null 31 Dec 20, 2022
Create an app using VIPER architecture

How not to get confused with VIPER Implementation This is a demo app to share in swift study group using VIPER Architechture When using VIPER Architec

null 1 Dec 4, 2021
IOS Swift Application using VIPER Architecture

IOS Swift Application using VIPER Architecture. This is a simple design application for E-Commerce using VIPER architecture and CoreData, I prefer using Delegate Protocols rather than Third Party Library such as Rx but at this project I make it as an example on how to using VIPER.The application also support localization.

Mahmoud Salah 0 Dec 1, 2021
A sample app demonstrates how to use Atlantis on Swift Playground (iOS/macOS)

Atlantis with Swift Playground A sample app demonstrates how to use Atlantis on

Proxyman 3 Dec 22, 2021
RMSUI - A Simple Swift MVVM architectured Rick & Morty UI app in order to practice SwiftUI & GraphQL

RMSUI A Simple Swift MVVM architectured "Rick & Morty UI" app ?? in order to pra

null 0 Jan 24, 2022
A simple Swift sample code to reads ISO 10303-21 exchange structure (STEP P21) file for AP242 schema.

simpleP21ReadSample A simple sample code to reads ISO 10303-21 exchange structure (STEP P21) file for AP242 schema. by Tsutomu Yoshida, Minokamo Japan

Tsutomu Yoshida 1 Nov 23, 2021