Trade-offs: I have decided to use MVP instead of MVVM, as MVP resolves the problem of having a dependent View by using Preseneter between Model and View. I feel it is more event-driven, and it makes separation of logic from the View. I couldn’t fully implement “Stretch”, however, I was able to retrieve the list of locations based on the current location’s coordinates. I have added the print statement in WeatherPresenter.swift within updateCurrentLocation(). I was planning to populate those lists of data in the MainViewController’s TableView, and when the user selects any of the rows, then I had plan to show it on the next screen. Due to time constraint, I have used Storyboard to create UI elements using UIKit.
Please run it on Xcode 13.2.1 or greater, and please run it on iOS 15 devices or greater.
Please select “Always Allow” when location pop-up shows up upon the first launch of the app, and please always make sure the blue arrow is selected when running on iOS Simulator (Please see the attached screenshot for the detail).
There has been no 3rd party libraries for this project. Please do not hesitate to reach out to me if you have any questions. Thank you!