The Swift Weather App is a simple yet powerful application built using Swift 5 and Xcode. It provides users with real-time weather updates and forecasts. The interface is designed to be user-friendly, displaying key weather information along with relevant imagery.
- Current Location Weather: Automatically displays weather data for the user's current location.
- Day and Temperature: Shows the day of the week and current temperature in degrees Celsius.
- Weather Conditions: Describes the current weather conditions along with an icon representation.
- City Selection: Users can select different locations to view the weather forecast by clicking on the 'Select Location' button.
- Search Functionality: Features a search bar to find cities quickly.
- Location Permission: On first launch, the app requests the user's permission to access location data.
- Home Screen - Shows the weather data for the user's current location.
- Select Location - Allows the user to choose a different city.
- Search City - Users can search for a city using the search bar.
- City Weather - Displays weather data for the selected city.
- OpenWeather API: The application fetches weather data using the OpenWeather API.
- City List: A JSON file containing the list of cities is sourced from the OpenWeather website.
- Alamofire: For making network requests to the OpenWeather API.
- SwiftyJSON: For parsing the JSON responses from the API.
- NVActivityIndicatorView: For displaying a loading animation while fetching data.
To run the Swift Weather App on your local machine, you will need to have Xcode installed. Clone the repository, open the project in Xcode, and run it on your preferred simulator or physical device.
Ensure that you have CocoaPods installed and run pod install
to get the necessary libraries set up for the project.
Upon launching the app, you will be prompted to allow location access. Granting access will automatically display the weather data for your current location. To view the weather in a different city, tap the 'Select Location' button and either select from the list or use the search bar to find your city.
Developed with ❤️ by Roshni Soni