Hi there,
My app uses all the Screen Time API's with individual
FamilyControls authorization. I've been using the API's for over 2 years (since they came out).
In iOS 18 Beta (maybe started in Beta 3?), I've been experiencing random issues. I tracked it down to where it seems like DeviceActivityMonitor extension is more likely to deadlock in iOS 18.
To reproduce: when DeviceActivityMonitorExtension.intervalDidEnd gets called, IF you call DeviceActivityCenter.startMonitoring
for that SAME DeviceActivityName
from the DeviceActivityMonitorExtension , the startMonitoring
call deadlocks (if I pause debugger, it does not advance past DeviceActivityCenter.startMonitoring).
The bug is reported in FB14664238. It also contains a sample project where you can reproduce this.
I also note in the comment section that this is not the only way to encounter this problem. My application code (which is a lot more complicated) seems to deadlock on calling DeviceActivityCenter.activities. As a result, there seems to be an "overall trend" where, due to some changes, DeviceActivityMonitor extension is more likely to deadlock.
The steps are not reproducible on iOS 17.6. This is built using Xcode 17.4.
Thank you! 🙏