Alias Challenge
Challenge following Service-oriented Architecture and MVVM Pattern.
? Environment setup
? Project Specifications
- Xcode 13+
- iOS 11+
- Swift 5
- MVVM
? Dependencies
- Swinject a Dependency Injection framework
- SwinjectAutoregistration extension to Swinject
- Moya a Network abstraction layer framework
- Kingfisher a pure-Swift library for downloading and caching images from the web
- SkeletonUI a skeleton loading animation
? About the project
? Folder Structure
AliasChallenge
|-- Services
| -- Models
|-- SupportingFiles
|-- Networking
|-- App
| -- Utilities
| -- Extensions
|-- Dependencies // Dependencies Registrations into a DI Container
|-- Views // App Screens with SwiftUI
| -- Home
? Dependency Injection
For Service Registration the project uses Swinject Library/Dependencies/Injector.swift
enum Injector {
static let sharedAssambler: Assembler = {
let container = Container()
let assambler = Assembler(
[
ServiceAssembly()
],
container: container
)
return assambler
}()
}
ServiceAssembly
Services registrations
? App Communication
graph TD; A(Networking) --> B(Services); B(Services) --> C(ViewModel); C(ViewModel) --> D(View);