I am able to obtain daily forecasts via the REST API which include the daytimeForecast and overnightForecast records with their respective properties like cloudCover.
So far I have failed to access them via the Swift API:
forecast.daytimeForecast.cloudCover
results in: "Value of type 'DayWeather' has no member 'daytimeForecast'".
But if I print() the DayWeather objects, these members are actually printed with all their properties.
Is there a way to get them I am overlooking?
Meet WeatherKit
RSS for tagDiscuss the WWDC22 Session Meet WeatherKit
Posts under wwdc2022-10003 tag
2 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
I'm trying to get historical data using the following syntax:
try await service.weather(for: location, including: .daily(startDate: past1, endDate: past2))
Where past1 and past2 are two dates in the past (I checked their format and they are correct).
I always get the same result, namely the 10 days default forecast you usually get calling service.weather(for: location)
Am I missing something?