Is there a list of possible values for CurrentWeather.CurrentWeatherData.conditionCode? I'm working with the WeatherKit REST API and I would like to display different icons based on the value of conditionCode.
Weatherkit: Possible Values of CurrentWeatherData.conditionCode
You might use symbol.Name
https://developer.apple.com/documentation/weatherkit/currentweather/symbolname
Refer to
- SF Symbols --> Weather
to get icons https://developer.apple.com/sf-symbols/
e.g. cloud.rain and more
I've got them here: https://github.com/hrbrmstr/weatherkit/blob/batman/R/enumerations.R
@rgilmour did you make any progress on this? I'm looking for a set of weather icons that correspond one-to-one with conditionCode
(to avoid having to use a custom mapping to some other icon set). But at the very least it would be helpful if a similar mapping already exists out there for some other icon set.
A link to that full enumerated listing right from the conditionCode
section in the REST API documentation would make things so much easier!
That said, after a good bit of digging I found this page on the Swift side of the house; combining with a partial response elsewhere about leading-capitalized camel-casing values, I think this may be the answer:
https://developer.apple.com/documentation/weatherkit/weathercondition
I believe each case
string can be leading-capital-camel-cased to determine the string to expect?