We have an app that allows users to fetch historical weather data for their selected locations. We are seeing users report failures for specific latitudes and longitudes that come back as
WeatherDaemon.WDSClient<WeatherDaemon.WeatherResource>.Errors.responseFailed
For example, this request always fails:
https://weather-data.apple.com/v3/weather/en-US/33.797/-111.775?timezone=America/Phoenix&dataSets=forecastDaily&dailyStart=2023-12-29T07:00:00Z&dailyEnd=2023-12-31T07:00:00Z&country=US&deviceLanguages=en-US&clientMetadata=<REDACTED>
Another example for another location:
https://weather-data.apple.com/v3/weather/en-AU/40.717/-74.000?timezone=America/New_York&dataSets=forecastDaily&dailyStart=2023-12-29T05:00:00Z&dailyEnd=2023-12-30T05:00:00Z&country=US&deviceLanguages=en-AU,es-AU&clientMetadata=<REDACTED>
Both example involve queries at the end of December 2023.
I have filed this as FB13608710 with example code that replicates this as it is being used in our app.
I want to update this with feedback that I received from Apple Developer Technical Support. "There is no workaround DTS can provide for the bug reports mentioned (FB13608710,FB13551253,FB13188858); they are all still under investigation."
So if you are seeing intermittent failures to download historical data using WeatherKit, or permanent failures at specific locations and dates, Apple is aware of it and it's not something you are doing wrong on your end. This includes failures where a request does not throw an error, but it silently fails to retrieve data from the middle of the range.
I have implemented a stand-alone SwiftUI view that demonstrates these failures to request historical data at this gist. You of course need to have a Xcode project with a WeatherKit Capability.
Hopefully this can be resolved by Apple, but we will be pursuing an alternate weather data vendor, as historical data availability is a tent pole of our app. Note that we have not seen problems with WeatherKit providing recent or forecast data, but it seems that historical data is not as much of a focus for WeatherKit as Time Machine was for Dark Sky. I can only imagine that few apps are relying on their historical data.