Swift-Weather is an iOS weather app powered by Dark Sky. The app provides current conditions, minute-by-minute rainfall predictions for the next hour and hour-by-hour forecasts for the next week. Originally written in Swift 2, the project has been updated for Swift 4.
- Dark Sky API integration.
- Google Places Autocomplete API integration.
- JSON Parsing.
- Custom UI Drawing and Animations.
- Today Extension (Notification Center Widget).
- Embedded Framework usage for code shared between app and widget.
- Core Data.
- Core Location.
- Unit Tests.
- FontAwesome and Weather Icons usage.
- iOS 10+
- Xcode 9
- Swift 4
- Clone this repository.
$ git clone https://github.com/jsh8w/Swift-Weather.git
- The project contains a
podfile
listing the Pods used in the app. Simply navigate to the project directory and run the following from Terminal:
$ pod install
- Open Weather.xcworkspace
- Head to Dark Sky, sign-up and get an API key.
- Head to the Google Places API, sign-up and get an API key.
- Open Constants.swift under WeatherKit replace the strings with your API keys.
public static let darkSkyAPIKey = "ENTER_YOUR_DARK_SKY_KEY"
public static let googleAPIKey = "ENTER_YOUR_GOOGLE_PLACES_KEY"
- Build the project and either run in a simulator or device.
This project is an old app that used to be on the App Store. I have decided to make it open-source. The majority of custom views are drawn out and manipulated programmatically - this has made certain logic long and complex. In hindsight, it would have been better to have further utilised storyboards and xibs to handle this custom view drawing. This is a potential improvement to the project.
Have any suggestions for improvements to the app? Please create an issue or pull request.
This project is licensed under the MIT License, see the License.md for more details.
- The app's weather data is provided by Dark Sky.
- The weather icons are provided by Weather Icons.
- The location autocomplete data is provided by Google Places.