WeatherQueries with start/end dates not returning forecast for those dates

try await WeatherService.shared.weather(for: sf, including: .daily(startDate: start, endDate: end))

If the start date is in the past I get an empty forecast. If start date is in the future I just get the current day's forecast. I tried with .hourly as well; got the same problem as I always get hourly data for the current day.

Accepted Reply

Thank you for your report. This is a known issue. We plan to address this soon.

Replies

Thank you for your report. This is a known issue. We plan to address this soon.

I just tried Xcode Beta 6 and iOS beta 7 -- no change. Will this be fixed before production? If I do not have a chance to verify that it works before I submit to the App Store I will have to remove the functionality from my app.

It turns out that it is working now, but just not the way I expected. It looks like the query only uses the "date" and returns 24 hourly forecasts when I specify a start/end date that is the same. Hmmm.

  • I stand correctly. I can get some hourly weather data, but when I try to get daily forecasts using .daily(startDate: start, endDate: end)I get nothing back and no errors.

Add a Comment

Thank you again for reporting this issue. It has been addressed.

The WeatherKit API allows one to request historical data for any location from August 1, 2021 until the current time and hourly and daily forecasts for the next 10 days. One may request a combination of historical and forecast data, but requests are limited to a single contiguous 10 day period.

  • That's for the information. It now makes it clear that I will not be able to use WeatherKit for my current purposes. I was hoping that the forecasts would become more almanac like when the requested dates are in the future past the next 10 days.

    I do see the SDK being very useful; just not for this particular app scenario.

  • Hello, the Dark Sky API provided historical data of 50 years back. This is an essential feature in our app. From you post, do I understand that historical data is only available until Aug 2021? That would be a huge bummer, and would make our app unusable after years of reliable usage with the Dark Sky API...

  • I was looking for forecasts beyond 10 days out, not historical data.

Add a Comment