This repo holds the code for Ahoy test App
This is a simple app which basically fetches weather data for 10 days from the given API, and parses the JSON response into models which are Codable
structs & ultimately displaying it in a tableview. Every cell is a weather information for a day which displays image for the weather, degree, date. On tapping any of the item, user can get into the detail screen.
Covered all required activities
- List of weather data for X number of days (Scrollable)
- Tapping on an item should open weather details view
- Call an API to get the weather information
- Use best practices for app architecture whenever possible - _(MVVM pattern followed)
- Unit tests using XCTest
- Simple UI tests using XCUITest
- Should Support orientation
- Local Notifications to show weather alert
- Settings view to change from Centigrade to Fahrenheit and vice versa
- Offline/Local storage (preferably Realm Framework)
- Presentable or Intuitive UI/UX
- Multiple variants for different environments (development-staging-production)
- Update weather info frequently in the background
Once you have clonned the app to your local system, you can fire-up the app by opening Weather.xcodeproj_ file.
Since the app has no complex business logic to test as such, I've written a simple test case to cover the APIService call made to fetch the data from the server, and ViewModel, Datasource
Please run entire test cases by pressing Commad+U
UI Test cases
- Displaying the tableview and tap each cell and go back to home screen