A beautifully designed weather app built using SwiftUI that fetches real-time weather data from the AccuWeather API. This app demonstrates the use of SwiftUI components, MVVM architecture, and API integration.
- 🌤️ Current weather based on user location
- 🔁 Pull-to-refresh to update weather info
- 🕒 Hourly forecast
- 📆 5-day weather forecast
- 📍 Location-based city name display
- 🧭 Animated weather backgrounds (day/night/rain/thunder/snow effects)
- 🧼 Clean MVVM architecture
Tool | Description |
---|---|
SwiftUI | Declarative UI framework |
Combine | Data binding and reactive programming |
AccuWeather API | Weather data provider |
CoreLocation | To get user location |
MVVM | Architectural pattern |
git clone https://github.com/way2dipak/WeatherApp-SwiftUI.git
cd WeatherApp-SwiftUI
Double-click the WeatherApp.xcodeproj
or open via terminal:
open WeatherApp.xcodeproj
No external package dependencies required — everything is native SwiftUI.
- Sign up on AccuWeather Developer Portal
- Generate an API key
- Add the key to Constant.swift
var apiKey = "YOUR_ACCUWEATHER_API_KEY"
Select a simulator or connect your iOS device and run the project using the
WeatherApp/
├── Views/ # SwiftUI views
├── ViewModels/ # ObservableObjects
├── Models/ # Codable structs for weather data
├── Services/ # Network and Location services
├── Utilities/ # Helper extensions and constants
├── Assets/ # Icons, background images, etc.
└── WeatherAppApp.swift # App entry point
- 📍 Search based Multi-city support
- 🔔 Weather alerts with notifications
- 📊 Charts for temperature trends
- 🌐 Localization support
- 🌐 Light and dark mode support
- 🌙 Dynamic UI based on time of day
This project is licensed under the MIT License.
👤 Dipak Singh
🔗 GitHub
📧 developer.dipak@gmail.com