FetchCodingChallenge.Demo.mov
A SwiftUI app that helps you explore dessert recipes from https://www.themealdb.com! This app displays recipe names in a list, with a sheet view for each individual recipe. Yum 😋
- Make sure you have Xcode version 14.0 or above installed on your computer.
- iOS deployment target is set to 16.0 for this project, but please make sure that your iOS deployment target is at least set to 13.0.
- FetchCodingChallenge implements an MVVM (Model-View-View-Model) architecture pattern.
- There is a ContentView as the default view with a ContentView-ViewModel, as well as a DetailView. The ContentView-ViewModel loads a list of desserts, and the DetailView shows dessert details from TheMealDB.com using vanilla Swift async/await methods.
- "views" holds ContentView and DetailView
- "view-models" holds ContentView-ViewModel
- "models" holds Meal, MealDetail, MealResponse, and MealDetailResponse which all represent Codable objects
- FetchCodingChallenge has unit tests written using the built-in framework XCTest.
- There are 2 unit tests written in "FetchCodingChallengeSlowTests" which verify a successful HTTP response of status code 200 for hitting TheMealDb.com's APIs
- The 1st test hits this API endpoint which lists all desserts: https://themealdb.com/api/json/v1/1/filter.php?c=Dessert
- The 2nd test hits this API endpoint which lists the meal details for the first dessert alphabetically in the database ("Apam balik" with id=53049): "https://themealdb.com/api/json/v1/1/lookup.php?i=53049"