WeatherKit airQuality mystery

Apple Recommended

Replies

I have also been wondering about this, furthermore, I am also not able to get uvIndex to work either. Sorry I don't have a fix, just sharing that I too am experiencing this issue.

Where are you seeing this? Is this using the REST API?

  • I'm using WeatherKit itself, not the WeatherKit REST API.

    This call in particular:

    WeatherService().weather(for: CLLocation)

  • Hmm, I'm still not seeing it…which platform are you testing this on? I would love to have this information, and it sounds like I can probably use Mirror to extract it, but it doesn't seem to be present for me…

  • Playgrounds in the Xcode 14.0 beta (14A5228q):

    import WeatherKitimport CoreLocation

    let weatherService = WeatherService()let spaceNeedle = CLLocation(latitude: 47.62, longitude: -122.35)let weather = try! await weatherService.weather(for: spaceNeedle)

    print(String(describing: weather))