Incidentally, the WeatherKit REST API includes precipitationAmount for hourly weather conditions: https://developer.apple.com/documentation/weatherkitrestapi/hourweatherconditions so it seems odd and inconsistent that it is not included in the Structure definition for HourWeather: https://developer.apple.com/documentation/weatherkit/hourweather
precipitationAmount
17 results found
Post
Replies
Boosts
Views
Activity
I'm trying to access this element of the HourWeather retrieved from a call to weatherService. When I print in the debugger what is received, it's clear that there is an element there called precipitationAmount. Here is an example of everything retrieved in HourWeather for a particular hour: HourWeather(date: 2022-06-12 22:00:00 +0000, cloudCover: 0.46, condition: Breezy, symbolName: wind, dewPoint: 9.12 °C, humidity: 0.71, isDaylight: true, precipitation: rain, precipitationChance: 0.23, precipitationAmount: 0.21 mm, snowfallAmount: 0.0 mm, pressure: 997.65 mbar, pressureTrend: Rising, temperature: 14.34 °C, apparentTemperature: 13.74 °C, uvIndex: WeatherKit.UVIndex(value: 1, category: Low), visibility: 25915.82 m, wind: WeatherKit.Wind(compassDirection: Northwest, direction: 304.0 °, speed: 29.47 km/h, gust: Optional(41.56 km/h))) But when I try to access that element as part of a SwiftUI view in Xcode (14.0 beta), I get this error: Value of type 'HourWeather' has no member 'precipitationAmount