How to do Background Fetch with SwiftUI

I’m trying to find a way to do Background Fetch with SwiftUI, I’m finding tutorials but they are all older tutorials that deal with app delegate file and storyboards.

I would like my app to check for new weather alerts in background and then alert the user if there is something new, is there anything better than Background Fetch for this because I know you cant really control how often background fetch fires.

OK, I have found a way to make this work like I want.

The app already uses location services to get alerts for the users current location. I just enabled Background mode for Location Update and now the app is able to keep checking for updates in the background for the users current location and then I’m sending a notification if there is anything new.