Marvel-Client
Marvel-Client copied to clipboard
iOS 15, MVVM, Async Await, Core Data, Abstract Network Layer, Snapshot Testing, Repository & DAO design patterns, SwiftUI and Combine
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
- Network Stubs for Testing
- Snapshot Testing
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.
- Snapshot Testing: framework used to compare different screenshots
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
- Filtering
Screenshots





