The WeatherTest app is a test assignment for a middle iOS developer. The application displays current weather information and forecasts for cities and countries using the OpenWeatherMap API. The app also supports offline mode with weather data stored locally using Core Data.
This project follows the MVVM (Model-View-ViewModel) architecture. MVVM was chosen for better separation of concerns, ease of maintenance, and leveraging the power of Combine for reactive programming and data binding.
- Weather by User Location: Automatically fetches weather data based on the user's current location.
- City and Country Search: Search weather by city or country using a text field.
- Offline Mode: Weather forecasts are saved in Core Data, allowing users to view previously fetched data without an internet connection.
- Core Data Integration: Stores fetched weather data to provide offline access to forecasts.
This app integrates with the OpenWeatherMap API to fetch real-time weather data. The API provides details such as temperature, humidity, wind speed, and multi-day forecasts.
The API key is already embedded within the project, so no additional configuration is required.
- iOS: 18.0+
- Xcode: 16.0+
- Swift: 6.0
- Clone the repository:
git clone https://github.com/Grachev-KA/WeatherTest.git
- Open the project in Xcode:
open WeatherTest.xcodeproj
- Build and run the project on a simulator or a physical device.
- MVVM: The app uses MVVM to separate the business logic from the UI, making the codebase more maintainable and testable. Combine is used for data binding between the ViewModel and View.
- OpenWeatherMap API: Provides real-time weather data. API requests are made based on user input (city, country) or geolocation data.
- Core Data: Core Data is used to persist weather forecasts locally, allowing offline access to previously fetched data.
- Offline Weather Storage: One of the main challenges was implementing offline storage for weather forecasts. This was resolved with light refactoring and by integrating Core Data to store and retrieve weather data for offline access.
The project was completed in 24 working hours.



- Add localization for multiple languages.
- Implement unit tests for the network and view model layers.
- Enhance UI/UX for better user experience.
This project is licensed under the MIT License. See the LICENSE file for details.