Alias Challenge

Challenge following Service-oriented Architecture and MVVM Pattern.

? Environment setup

? Project Specifications

  1. Xcode 13+
  2. iOS 11+
  3. Swift 5
  4. MVVM

? Dependencies

  1. Swinject a Dependency Injection framework
  2. SwinjectAutoregistration extension to Swinject
  3. Moya a Network abstraction layer framework
  4. Kingfisher a pure-Swift library for downloading and caching images from the web
  5. 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);

GitHub

View Github