Post

Replies

Boosts

Views

Activity

Reply to Following "Meet WeatherKit"- getting async error
Solved the issue: I forgot to include the given code in a struct and initialize the variables. import WeatherKit import CoreLocation struct RequestWeather { let weatherService = WeatherService() let chicago = CLLocation(latitude: 47, longitude: 87.58293) let weather : Weather let temperature : Measurement<UnitTemperature> init() async { weather = try! await weatherService.weather(for: chicago) temperature = weather.currentWeather.temperature } }
May ’23