Rick&Morty is an American television series that narrates the adventures of Rick, a peculiar and crazy genius; and Morty, his shy and not very smart grandson. This application tries to show all the different contents of this TV show. You can search through hundreds of characters, episodes, and discover all the planets that create this universe.
This application was created with the aim of learning new skills of the iOS development environment, such as the VIPER architecture, UIKit framework, Cocoapods... and more.
Characters List | Character Detail | Episodes List |
---|---|---|
Episode Detail | Locations List | Location Detail |
This project uses Clean Architecture and is separated into four main layers:
- Data: In this folder are the (DTO) data models, which are the object representation of the JSON request, and the Data Source, which is in charge of the data request to obtain the characters, episodes, or locations.
- Domain: The information obtained by the DataSource goes to the Interactor, whose mission is to pass this information to the presenter. Also, this is where the business logic takes place.
- Module: Inside this layer we find 3 fundamental pieces in the development of the architecture:
- The Presenter is the most important component of VIPER next to the interactor as it acts as a bridge between the VIPER modules and contains the presentation logic. It receives events from the view and reacts to them by requesting the necessary data from the interactor. In the opposite direction it receives the data from the interactor, applies the logic and prepares the content to be passed to the view for display.
- The Router links and creates the different modules of the application, and also has the task of navigating between views. It must implement a protocol that includes all the navigation possibilities between modules.
- The View is a ViewController that contains programmatically implemented sub-views. The view has the responsibility of displaying in the interface the information coming from the presenter and collecting events from the user by delegating them to the presenter.
- Core: Contains the common code between the other layers, like extensions, reusable views for all the aplications, and managers. These are abstractions of important parts used in the app, such as making network requests.
📦rick-and-morty
┣ 📂Resource
┗ 📂Source
┣ 📂AppDelegate
┣ 📂Core
┣ 📂Presentation
┃ ┣ 📂Splash
┃ ┣ 📂TabBar
┃ ┣ 📂Characters
┃ ┣ 📂CharacterDetail
┃ ┣ 📂Episodes
┃ ┣ 📂EpisodeDetail
┃ ┣ 📂Locations
┃ ┗ 📂LocationsDetail
┣ 📂Domain
┃ ┣ 📂GetCharacters
┃ ┃ ┣ 📂Interactor
┃ ┣ 📂GetCharacterDetail
┃ ┃ ┣ 📂Interactor
┃ ┣ 📂GetEpisodes
┃ ┃ ┣ 📂Interactor
┃ ┣ 📂GetEpisodeDetail
┃ ┃ ┣ 📂Interactor
┃ ┗ 📂GetLocations
┃ ┗ 📂Interactor
┗ 📂Data
┣ 📂Characters
┃ ┣ 📂DataSource
┃ ┗ 📂DTO
┣ 📂Episodes
┃ ┣ 📂DataSource
┃ ┗ 📂DTO
┗ 📂Locations
┣ 📂DataSource
┗ 📂DTO
Tool | Used for |
---|---|
VIPER | Architectural design pattern for separating the logic form the views |
UIKit | Framework used to build apps |
Kingfisher | Library for downloading and caching images from the web. |
Cocoapods | Dependency manager |
- Xcode 15.0
- Swift 5.7
- iOS Deployment Target 16.0