I have a SwiftUI app and it monitors two sets of apps screen time with Device Activity API but basically when the eventDidReachThreshold func gets called for one of the events even though the app is not open it just for now sends a push notification when i want to basically trigger the DeviceActivityCenter().startMonitoring again and some userdefaults changes in the background.. I tried doing this with notificationCenter without much success.. Is there a way to handle tasks in background upon the triggering of the device activity monitor extension functions? Like an API for background tasks or something? Thank you!




