Inconsistency in the DeviceActivityEvent callbacks

We are using the Apple ScreenTime API for monitoring the usage of device. As mentioned in the documentation (https://developer.apple.com/documentation/familycontrols), we are getting the family controls authorisation from the user. We also have added the ‘DeviceActivityMonitor’ app extension (https://developer.apple.com/documentation/deviceactivity/deviceactivitymonitor) to receive the schedule and event callbacks.

We have a requirement in which we have to notify the user for every 15 minutes usage of the device in the specified interval. He can optionally select individual categories or applications for the 15 minutes notification. For monitoring the usage for individual categories or applications, we obtain the token by presenting the FamilyActivityPicker as discussed in this documentation https://developer.apple.com/documentation/familycontrols/familyactivitypicker.

For simplicity in testing during the development phase, we reduced the 15 minutes to 2 minutes. The events callbacks are expected to be delivered as soon as the threshold is reached but there are some inconsistencies with the event threshold callbacks. Sometimes the event callbacks are deferred and delivered together, sometimes the event callbacks are not delivered at all, sometimes a few event callbacks are missed etc.

I'm experiencing the exact same issue. Seems to have been introduced in iOS 17.5.1

I have tested the same in iOS 18 Beta 4 and the results are the same. Still the event callbacks are inconsistent.

Hey I'm experiencing the same issues, it especially happens when the includesPastActivity property of a DeviceActivityEvent is set to false. The process responsible for firing the events seems to not take in account app usage.

I've filed a feedback report: FB15220094. It contains a more detailed explanation of the issue with logs showing exactly what is happening.

Inconsistency in the DeviceActivityEvent callbacks
 
 
Q