A simple Swift library for accessing weather data in your app. WeatherKit is based on the OpenWeatherMap API.
Features include getting location-based current weather conditions based on:
- City name
- City ID Code
- Lat/lon coordinates
- Zip code
Recommended to use Carthage.
- Add
github.com/davemess/WeatherKit.git
to your Cartfile - Perform a
carthage update
- Embed the built product in your app's embedded frameworks.
- Initialize your WeatherKit instance:
let weatherKit = WeatherKit(apiKey: <#API_KEY#>)
- Request weather at a location:
let coordinate: CLLocationCoordinate2D = // access the user's current location
weatherKit.getCurrentWeather(at: coordinate, success: { (weather) in
// do something with `weather`
}) { (error) in
// handle error
}
- Use properties of the
Weather
struct, including temperature, humidity, rainfail, etc.
Admin
- Document public interface
- Update readme with usage
- Versioning
Project
- Unit Testing
- Swift Lint
- Docs
- Badges
Features
- Add Current Weather
- Check HTTP status code
- Add Forecast
- Configure timeout/urlsession
- Add Operations/Operation Queue
- Update for Xcode 10