[quote='874812022, DTS Engineer, /thread/814559?answerId=874812022#874812022']
Make certain you properly handle rescheduling scenarios.
[/quote]
Hey Albert @DTS Engineer @DTS Engineer!
Thanks a lot for your input on this!
My bug report has been updated recently (FB18061981), and I have a follow up question:
Now that the Screen Time devs have figured out the root cause of this bug, is it feasible to re-schedule the DeviceActivityEvent from within the eventDidReachThreshold(…) callback if we detect that it was called too early?
We do have a workaround in place that dismisses the eventDidReachThreshold call if we detect that it was called unreasonably early:
let timeSinceSchedulingActivity = currentTimeStamp - timeStampOfSchedulingActivity
if timeSinceSchedulingActivity < 50 {
// do not proceed to shielding the activity because this is not a real threshold callback, this is a bug!!!
return
}
If we now, within this if condition, try to start a new DeviceActivityEvent that replaces the previous malfunctioning one, would that work?
Or would that automatically run into the same problem again?
I’m curious, because we are of course interested in providing a workaround until the fix is out & to provide a better-working version for the users that have not yet updated. Many of our users are afraid to update their iOS versions because historically more and more Screen Time bugs were introduced with every update instead of addressing previous bugs.