The WeatherAssistant is an iOS weather app built with SwiftUI, leveraging the OpenWeather API for real-time weather and a 5-day forecast. It features voice search for locations, auto-complete suggestions, and a dynamic UI with automatic day/night theme switching. The app also includes accessibility support and displays local time for searched locations.
- Real-time Weather Data: Get current weather conditions including temperature and weather status
- 5-Day Forecast: View weather forecasts for the next 5 days
- Voice Search: Search locations using voice commands
- Location Search: Auto-complete search suggestions for cities worldwide
- Dynamic UI:
- Automatic day/night theme based on location's local time
- Manual theme toggle option
- Weather-appropriate icons
- Local Time Display: Shows the current time at the searched location
- Accessibility: VoiceOver support and accessibility labels
- Swift
- SwiftUI
- Combine Framework
- Speech Recognition Framework
- OpenWeatherMap API
- WeatherViewModel: Manages weather data and API interactions
- SpeechRecognizer: Handles voice input and speech-to-text conversion
- Location Search: Geocoding API integration for location suggestions
- Dynamic Theming: Automatic theme switching based on local time
- Async/Await: Modern concurrency for network calls
- Error Handling: Comprehensive error management and user feedback
- OpenWeatherMap Current Weather Data
- OpenWeatherMap 5-day Forecast
- OpenWeatherMap Geocoding API
-
Clone this repository:
git clone https://github.com/sandy787/WeatherAssistant.git
-
Open WeatherUI.xcodeproj in Xcode
-
Create Config.swift from Config.template.swift and add your API key:
struct Config { static let weatherApiKey = "YOUR_OPENWEATHERMAP_API_KEY" }
-
Build and run the project
- iOS 15.0+
- Xcode 13.0+
- OpenWeatherMap API key
-
Search for a Location:
- Type in the search bar
- Use voice search by tapping the microphone icon
- Select from auto-complete suggestions
-
View Weather Information:
- Current temperature
- Weather condition
- Local time
- 5-day forecast
-
Theme Toggle:
- Automatic based on local time
- Manual toggle with "Change Day Time" button
- Microphone access for voice search
- Speech recognition for voice input
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE.md file for details
- Weather data provided by OpenWeatherMap
- Icons from SF Symbols
- Speech recognition powered by Apple's Speech Framework
Config.swift

