The problem statement is
- At http://www.codetalk.de/cars.json you get a JSON list of cars with some basic information.
- Implement an iOS app with the latest tools in SWIFT, that downloads this file and use all information available that you think makes sense to display:
- Displays these cars in a list.
- Displays these cars on a map.
- Note: The carImageUrl is not up to date anymore, therefore, you can get the correct URL to the car image using this pattern: https://prod.drive-now-content.com/fileadmin/user_upload_global/assets/cars/{modelIdentifier}/{color}/2x/car.png
- In case there are still images missing, use a fallback.
- You may use any external frameworks / libraries you like, just add a short note why you chose this one and what you use it for.
- No Rx*/Reactive*
- Focus more on architecture, structure & clean code, less on design.
The code is written in Swift 4.0 (although needed Pods to compile in Swift 3.2, as they were not updated).
The code is in RIBLER architecture introduced by UBER in this post.
RIBLER is an adaptation of
VIPER,
with a solution to its incoherent problem of communication between modules.
- Alamofire
- I used Alamofire to make Network calls. Although it was a single simple API call which could have been easily done with NSURLSesssion, I used Alamofire as it playes well with Alamofire Object Mapper
- Alamofire Object Mapper
- To parse JSON to PONSOs
- Kingfisher
- To download and use images