Easier way:
- Run the mock server
- Select the local scheme
Other way:
- Create a new account on the Marvel website
- Create a new MarvelMovieDB-info.plist file
- Add your keys "PRIVATE_KEY" / "PUBLIC_KEY"
- Run the application with the common scheme
To run the tests targets, you need to use an iphone 15 simulator with iOS 17.0. Why? because the snapshot tests refenrences had been done on this device and iOS version. Also you need to run the mock server and use the local scheme to assert all the UITests
In this example we applied clean code with the three layers
Presentation layer (MVVM): contains UI (UIViewControllers or SwiftUI Views). Views are coordinated by ViewModels (Presenters) which execute one or many Use Cases. Presentation Layer depends only on the Domain Layer.
Domain layer: It contains Entities, UseCases, Errors, etc.
Data layer: Data Layer contains Repository Implementations and one or many Data Sources. Repositories are responsible for coordinating data from different Data Sources. Data Source can be Remote or Local (for example persistent database). Data Layer depends only on the Domain Layer. In this layer, we can also add mapping of Network JSON Data.