π€οΈ SwiftUI 5-Day Weather Forecast App
A clean and lightweight iOS app built with SwiftUI that displays the weather forecast for the next 5 days, including today, using data from WeatherAPI.
π² Features
Each forecast item shows:
condition.text β Textual weather description (e.g. Sunny, Cloudy)
condition.icon β Icon representing the weather
avgtemp_c β Average temperature (Β°C)
maxwind_kph β Maximum wind speed (km/h)
avghumidity β Average humidity (%)
The app uses a single, scrollable screen powered by SwiftUI, with a focus on clarity and performance.
π Weather API
Data is fetched from:
https://api.weatherapi.com/v1/forecast.json
Required query parameters:
key β Your API key
q β Location (e.g. city name or coordinates)
days=5 β Number of forecast days (must include today)
aqi=no β Disable air quality (optional)
alerts=no β Disable alerts (optional)
Example: https://api.weatherapi.com/v1/forecast.json?key=YOUR_API_KEY&q=Paris&days=5&aqi=no&alerts=no
π Tech Stack
Swift
SwiftUI
Combine / async-await
MVVM architecture
URLSession for network calls