Last revision: 8.2.2021
-
Space Launches is an app which presents all the past Space-X launches and detail of every launch. User is able to search and sort list of launches. Caching of images is being used on the background for better user experience. Dark Mode is and landscape mode is supported.
Project Support:
- iPhone
- iOS 14+
- Swift 5
- Xcode 12+
- Used architecture is MVVM (Model-View-ViewModel). This architecture separates into three main groups:
Models hold application data. Contain data providers which call data using networking objects inside API.
View models transform models into values that can be displayed on a view. View model is responsible for business logic.
Views display controls and view elements on the screen. This project uses SwiftUI framework for view layer.
- Data to domain object mapping is used to separate Data layer and Domain layer of the application. Mapping is being done upon receiving data from
APIinside every data provider withmapToDomainfunctions.
- Scene specific logic is separated for every scene. For example logic specific for Launches list is inside
LaunchesListand shared logic for all scenes can be found insideCommon.
- Dependecy Injection (DI) is being used for data providers in view models so their protocols can be simply injected for possible future UnitTests implementation. This is achieved by lighweight DI library Resolver.
- This library uses property wrappers often used in
SwiftUIand is capable of injection of it'sObservableObject. - Registering of dependencies is being done inside
AllServicesResolver.
- App uses well known Alamofire library.
Decodableprotocol withCodingKeyis used for JSON decoding.
UserDefaultsstandard storage is used to store launches list sort methods.
- Generally I want to use as few dependencies as possible. All dependencies are being handled by built in Swift Package Manager. GitHub page. Official manual.
-
You can view all dependencies in Project file -> Project -> Swift Packages (in the horizontal menu) or in
Swift Package Dependeciesat the end of the files structure. -
Alamofire - Networking.
-
Kingfisher - Lightweight asynchronous image downloading and caching.
-
Resolver - Dependency Injection.
- All Localizations can be found inside
LocalizationKit. English is the only supported language.
- All notable changes to this project are documented in this file.