Overview
iOS 15 Client for Marvel API with the following features:
- MVVM
- Abstract Network Layer
- SwiftUI
- Async/Await
- Theme Switcher
- Core Data persistence with Async/Await approach + One To Many Relationship
- DAO, Repository and Dependency Injection Design Patterns
- Unit Testing: Network Layer, CoreData DAO, Repository, JSON Decodable
Set-Up
- Register in https://developer.marvel.com/
- Replace Private and Public Key variables in /APIService/Router.swift
- Install Swiftlint via
brew install swiftlint
- Xcode 13 should be installed
Architecture
Dependencies installed via SwiftPM:
- Backed Decobale property wrappers for nested JSON.
- OHTTPS: framework for stubbing network requests.
- Swiftlint: linter for cleaner code.
- CachedAsyncImages: Wrapper for Appleβs AsyncImage class to cache images.
View Use Cases
- Get Heroes
- Pagination
- Delete Hero via Swipe
- Delete All Heroes
- Make Favorite Heroes
- Sort Heroes by Favorite & Name
- Pull to Refresh
- Loading State
- No Internet Connection Pop-Up
- Empty State
- Persistent Data