WeatherDashboard is a native iOS application developed using SwiftUI. The purpose of the application is to provide real-time weather information and nearby tourist attractions for any user-specified location worldwide.
It integrates live weather data, geocoding, maps, and local data storage into a clean, modern multi-tab interface.
The application consists of four primary tabs:
- Now
- 8-Day Weather
- Map
- Visited Places
Each tab presents specific information related to the selected location while maintaining synchronized data across the entire application.
- Users can enter any city name.
- The application converts the place name into geographic coordinates using
CLGeocoder. - Weather and map data are updated dynamically across all tabs.
- Displays current temperature and weather condition.
- Shows sunrise and sunset times.
- Displays additional weather metrics such as pressure.
- Generates a contextual weather advisory message using an enumeration-based logic structure.
- Uses a gradient background consistent with the overall design.
- Presents a bar chart visualising daily high and low temperatures.
- Includes a scrollable textual summary of the forecast.
- Implements dynamic colour representation based on temperature values.
- Displays an interactive map using MapKit.
- Shows five nearby tourist attractions retrieved using
MKLocalSearch. - Supports map interaction:
- Selecting a list item centres the map on the location.
- Selecting a map pin zooms to the region.
- Long pressing a location opens a web search in the browser.
- Saves searched locations using SwiftData.
- Allows reloading of previously saved locations.
- Supports swipe-to-delete functionality.
- Enables long-press web search for stored locations.
- Invalid location input triggers a user alert.
- The application reverts to the default location (London) when an error occurs.
Upon first launch:
- The application automatically loads weather and map data for London.
- All tabs display synchronised data for this default location.
The application is implemented using the following technologies:
- Swift 6+
- SwiftUI
- SwiftData
- CoreLocation (CLGeocoder)
- MapKit (MKLocalSearch)
- OpenWeather One Call API 3.0
- Async/Await networking model
No external third-party frameworks were used.
The project demonstrates the following development concepts:
- JSON data modelling and decoding
- Modern asynchronous networking using async/await
- Structured error handling
- Geocoding and coordinate management
- Persistent storage using SwiftData
- Tab-based interface design in SwiftUI
- State management and cross-view data synchronisation
- Xcode 16.x
- iOS 17 or later
- Valid OpenWeather API key
- Clone the repository:
git clone https://github.com/Himidiri/WeatherDashboard.git
- Open the project in Xcode:
WeatherDashboard.xcodeproj - Insert a valid OpenWeather API key in
WeatherService.swift. - Build and run on iOS Simulator or a real device.











