Hi, I've faced a unexpected behavior in my screen time app (AppStops) when using structured concurrency tools in non-isolated DeviceActivityMonitor class.
This changes may solve your problems.
Remove @MainActor from AppUsageManager
Remove Task from your codes.
I recommend you to use non-isolated types and methods for DeviceActivityCenter.
I hope this helps.
Topic:
App & System Services
SubTopic:
General
Tags: