Restaurants is a iOS application written in swift with UnitTests and UITests.
This application has follwoing use cases:
- Loads list of restaurants from
json
file and present in tableview. - Always sort by the status(
open
restaurants will appear on top,orderahead
restaurants in middle and closed restaurants inbottom
) - Search Restaurant by name.
- Sort restaurants by various sorting options (defined in json file)
- Persist sorting options to local storage(
NSUserDefaults
)
MVVM
{
"restaurants": [{
"name": "Tanoshii Sushi",
"status": "open",
"sortingValues": {
"bestMatch": 0.0,
"newest": 96.0,
"ratingAverage": 4.5,
"distance": 1190,
"popularity": 19.0,
"averageProductPrice": 1536,
"deliveryCosts": 200,
"minCost": 1000
}]
}
This is a xcode project
application.
- Deployment Target iOS 15.0
- Xcode version 13.1
Open this project in xcode and select the scheme Restaurants
and select the simulator (should have iOS version 15.0 or higher) and run the application .