I'm building a parental-control app using FamilyControls, ManagedSettings and DeviceActivity. A guardian can lock a child's device from their own device, and the child's device applies the shield locally.
The delivery problem: a background push can't wake our app once it has been force-quit, which is common on a child's device, so guardian-initiated changes sit undelivered until the child happens to open the app.
I've found that DeviceActivityMonitorExtension still receives intervalDidStart / intervalDidEnd while the app is force-quit, and that a URLSession request started from the extension completes. So I could register a couple of short recurring DeviceActivitySchedule activities purely to wake the extension every ~15 minutes, check the server, and apply the resulting shield.
My question: is using DeviceActivitySchedule purely as a wake mechanism — where the schedule doesn't correspond to any real usage-monitoring window — a supported use of the API, or is it working by accident? I'd rather not build on it if it's the latter.
Two smaller ones, if anyone knows:
Is network activity from the monitor extension expected to be given time to complete, and is there a documented execution budget? I've seen reports here that the extension stops being invoked after some days without the host app launching. Is that expected, and what re-arms it? If there's a supported mechanism for this that I've missed, I'd much rather use it.