WatchKit Background Tasks in Swift UI App

I'm working through and following this great tutorial on how to keep complications up to date using background refresh, however I'm struggling to find out how to implement the functionality in a pure SwiftUI app.

In order to handle background refresh tasks it is necessary to call this handler:
Code Block
func handle(_ backgroundTasks: Set<WKRefreshBackgroundTask>)

Which is part of the WKExtensionDelegate protocol which isn't part of the new SwiftUI app structure.

Is there a way to implement handling of background tasks as part of the @Main App protocol, without needing the Extension Delegate?
Code Block swift
@main
struct CardioBotApp: App {
@WKExtensionDelegateAdaptor(ExtensionDelegate.self) var delegate
}

You can use adaptor property wrapper to provide WKExtensionDelegate
WatchKit Background Tasks in Swift UI App
 
 
Q