ceeK / Solar

A Swift micro library for generating Sunrise and Sunset times.
MIT License
568 stars 82 forks source link

WeatherKit #60

Open 1ec5 opened 2 years ago

1ec5 commented 2 years ago

WeatherKit has a CurrentWeather.isDaylight property and SunEvents struct that essentially replicate the functionality of this library. However, WeatherKit is only available for this year’s operating system releases (iOS 16, iPadOS 16, macOS 13, tvOS 16, watchOS 9). Should this library somehow integrate with WeatherKit on supported platforms, perhaps becoming a compatibility shim for it on unsupported Swift platforms like Linux?

1ec5 commented 2 years ago

This might be a tad optimistic, considering potential pricing and usage limits around WeatherKit in general, but I opened this issue in case the presumably local stuff above is exempt.

gshaw commented 2 years ago

WeatherKit also requires a network connection and as isn't free. Personally, I think there is value in having a focused Swift package like Solar for those that need sunrise and sunset but not the weather.

1ec5 commented 2 years ago

Yeah, it’s unfortunate that the calendrical functionality got bundled up with the live weather functionality. Maybe a good next step would be to investigate and document how well this library and WeatherKit agree on the sunrise/sunset calculations?