An iOS UIKit application that displays real-time weather information for multiple cities using the OpenWeather API.
This project demonstrates API integration, JSON parsing, local data persistence, and custom UI layouts — built as part of an academic project at Seneca Polytechnic.
- 🔍 City Search — Look up any city using OpenWeather’s Geocoding API
- 🌆 City Watchlist — Save and manage your list of tracked cities
- 🌤️ Current Weather Display — View real-time temperature, condition, and weather icon
- 📅 5-Day Forecast — Displays detailed upcoming weather with time-based updates
- 💾 Local Persistence — Saves your cities locally using
PropertyListEncoderandPropertyListDecoder - ✨ Onboarding Screen — Animated gradient welcome view for a polished first-launch experience
The app follows the MVC pattern (Model–View–Controller), separating data, UI, and logic for maintainability.
WeatherModel.swift— Handles current weather data, temperature, icons, and sunrise/sunset logicForecastModel.swift— Decodes and structures 5-day forecast dataCityModel.swift— Represents city name and coordinatesPersistenceManager.swift— Saves and retrieves stored cities using property lists
CityListCollectionViewController— Displays saved cities with live weather updatesSearchCityViewController— Allows users to search and add new cities via APIForecastDetailViewController— Shows detailed forecast for selected cityOnboardingViewController— Welcome screen with gradient animation
WeatherService.swift— Handles all API requests and JSON decoding from OpenWeather
CityCollectionViewCell— Custom collection cell with gradient temperature backgroundForecastTableViewCell— Table cell showing daily forecasts
This app uses the OpenWeather API for weather data and geocoding:
-
Weather Endpoint:
https://api.openweathermap.org/data/2.5/weather -
Forecast Endpoint:
https://api.openweathermap.org/data/2.5/forecast -
Geocoding Endpoint:
https://api.openweathermap.org/geo/1.0/direct
All data is fetched asynchronously and decoded into Swift models using Codable.
- Swift 5 & UIKit
- Networking:
URLSessionwith async data tasks - Persistence: Property List Encoding/Decoding
- UI Design: CollectionView + TableView controllers
- Animation:
CAGradientLayerfor dynamic weather visuals - Error Handling: Safe optional unwrapping for network results
| Splash Screen |
|---|
![]() |
| Empty Watchlist | Add City | Added Cities | Delete Cities |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
| Search Toronto | Search Manila |
|---|---|
![]() |
![]() |
| Current Weather | 5-Day Forecast |
|---|---|
![]() |
![]() |
Andrea Selina Perez
📍 Seneca Polytechnic – Computer Programming (iOS & Data Structures focus)
📫 andreaselinaperez26@gmail.com
🌐 GitHub Profile
⭐ If you liked this project, consider giving it a star on GitHub!








