hadanischal / NearbyHospitals

A simple app to retrieve and display a list of Hospitals launches from https://gist.githubusercontent.com/hadanischal/ using MVVM pattern with RxSwift in Swift.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NearbyHospitals

Requirements:

  • iOS 13.0+
  • Xcode 11.6
  • Swift 5.2

Objective:

This sample app to demonstrate some aspect of clean architecture using MVVM pattern, RxSwift, dependency injection, SOLID principles , loose coupling, unit testing, Dark mode support and some of the best practices used in modern iOS programming using Swift.

App Goal:

  • This project was intended to work as a Hospital search demo projects for iOS using Swift.
  • The demo uses the Hospital Finder API which returns information in a JSON format.
  • Use of UITableViewController to display Hospital list information.
  • Implemented Unit test for business logic.
  • Use of RxSwift for Reactive programming.

Installation

  • Xcode 11.6(required)
  • Clean /DerivedData folder if any
  • Run the pod install pod install
  • Run Cuckoo script to Mock your Swift objects ./Cuckoo-GeneratedMocks.sh
  • Run SwiftGen script to generator Swift code for assets, Localizable.strings etc ./generate-swiftgen.sh
  • Then clean and build the project in Xcode

3rd Party Libraries

Technical notes:

  • MVVM - My preferred architecture.
    • MVVM stands for “Model View ViewModel”
    • It’s a software architecture often used by Apple developers to replace MVC. Model-View-ViewModel (MVVM) is a structural design pattern that separates objects into three distinct groups:
  • Models hold application data. They’re usually structs or simple classes.
  • Views display visual elements and controls on the screen. They’re typically - subclasses of UIView.
  • View models transform model information into values that can be displayed on a view. They’re usually classes, so they can be passed around as references.

Alt text

Screenshot:

Screen Shot 1

Screen Shot 2

App Demo

About

A simple app to retrieve and display a list of Hospitals launches from https://gist.githubusercontent.com/hadanischal/ using MVVM pattern with RxSwift in Swift.


Languages

Language:Swift 98.5%Language:Shell 0.9%Language:Ruby 0.6%