DeviceActivityMonitor event threshold callbacks often triggered multiple times in a row

My app sends screen time awareness notifications based on DeviceActivityMonitor thresholds.

Often, users receive two notifications in a row for the same screen time threshold. This means that the app extension is triggering the same eventDidReachThreshold callback function twice for the same threshold. I've made sure that there is only one activity schedule being monitored. This happens often, but not every time (over 50% of the time).

Anybody else experience this issue, and any way to mitigate it?

It's possible that the function fails before it returns and is retried. Does anyone know the retry policy for DeviceActivityMonitor override functions?

By any chance you're recursively setting another threshold monitoring upon threshold reached?

@charleswinston if you get a chance, please help answer some of the questions asking how to get the callback to run in the first place :)

DeviceActivityMonitor event threshold callbacks often triggered multiple times in a row
 
 
Q