WeatherKit in a background operation?

Sorry if this is a stupid question but I haven't been able to find any information on whether an app can request and receive weatherKit data - the weather - while in the background.

My app (AirCompare) makes extensive use of background URL sessions to fetch and process weather data. If certain conditions are met, a notification alert is sent to the user so the user can decide whether to activate the app. For instance if rain is in the forecast, the app alerts the user that they might want to close their windows. Making the app active will execute HomeKit control and accomplish that.

Will I be able to replace the background URL session with the appropriate code and be able to fetch weather data in the background?

did you figure it out?

I'm trying to do the same, the only option I can think of is:

  1. have a server calling weatherkit every 5 mins
  2. if there is an alert then send notification to the user

but they should have a webhook, otherwise becomes expensive

This is still an open question. @naticio, your reply suggests that it cannot run in the background. Am I misreading you? The inability to check the weather occasionally without user input would be a HUGE negative for WeatherKit. It means you can't "warn" the user of significant weather changes like imminent rain.

Related question: Is it possible to play with weatherKit in an Xcode playground? So far I can reliably crash Xcode by even attempting this. I'll post this as a separate question.

WeatherKit in a background operation?
 
 
Q