Hi Bjorn, I did some quick tests on my end using the template from the article, and it looks like it works if you declare hourlyWeatherForecast as an optional by including a question mark like this:
var hourlyWeatherForecast: Forecast<HourWeather>? {
let forecast = (weather?.hourlyForecast) //TODO: handle error case
print("Forecast: \(forecast)")
return forecast
}
I believe this might be partially due to the fact that when the app first launches, the location is not yet known because the .task is still accessing CoreLocation, so in those very first moments, the weather data will be nil because it doesn't have any location to pull weather data from.
Hope this helps!