I'm using WeatherKit SDK for history data fetching
To get data, I'm using next code:
do {
let weather = try await WeatherDataSourceWeatherKit.weatherService.weather(
for: location,
including: .daily(startDate: date.startOfDay, endDate: date.endOfDay)
)
let weatherDays = weather.forecast.first!
// Data handling
}
If I po received DayWeather object in console, it contains useful fields daytimeForecast and overnightForecast
But when I try to access this data from the code, it's unavailable:
Question:
How I can get that daytimeForecast from object?



At current day (Aug 12, 2023)
daytimeForecastandovernightForecastvalues are not available through SDK due to API access limitationsAccording to documentation, it's available only via WeatherKit API:
REST API response:
I've tried few ways to access it but no success. Feel free to suggest ways to overcome it or inform me when this data will be available in public API, so I can update the answer