I've been trying to get something to work with the Screen Time API, but almost everything related to it is completely and truly broken/unimplemented. I've tried all of this in the iOS 15 Beta 2 and 3 and Xcode 13 Beta 2 and 3.
These are just a handful of the bugs I came across:
-
Screen Time APIs do not work on the simulator. Calling
AuthorizationCenter.shared.requestAuthorization
on a simulator with a logged in child account always results in"FamilyControls.FamilyControlsError Code=3"
-
FamilyActivityPicker
does not list installed apps on either of the guardian's or child's devices, it only lists the categories. It's not clear at this point whetherFamilyActivityPicker
needs to be called on the parent or the child device. -
Assuming restrictions can actually be set, there is no API to allow setting up of restrictions for individual kids.
-
After successfully authorizing a child device via
AuthorizationCenter.shared.requestAuthorization,
DeviceActivityCenter.startMonitoring
always results in anMonitoringError.unauthorized
error. -
AuthorizationCenter.requestAuthorization
error in callback cannot be mapped back toFamilyControlsError
because it is a plainNSError
with an error code andFamilyControlsError
does not expose an initialiser that takes a rawValue. -
Even though an app is authorized to managed ScreenTime on a child device, the child can always just delete the app. (I would try to submit a bug with device diagnostics about this using Feedback Assistant, but to top it all off at the moment I am receiving an error in FA that says "Unable to gather diagnostics" / "A problem was encountered when trying to gather diagnostics. Try gathering diagnostics again").
-
There's no device activity / shield configuration or shield action extension templates in Xcode. For those wondering, I created a
CallDirectory
extension and then changed theNSExtensionPointIdentifier
in the plist to the appropriate value. What is the appropriate value? It's not mentioned in the documentation :), so I had to dig around in the Xcode support files to find out the following identifiers:
com.apple.ManagedSettings.shield-action-service
com.apple.ManagedSettingsUI.shield-configuration-service
com.apple.deviceactivity.monitor-extension
- And this leads me to my last item: the documentation which is absolutely lacking. There is no programming guide for the frameworks and the Homework app we saw developed during WWDC is not available. It's not clear how the settings from the guardian app get applied to the child app. Is there a built-in mechanism or do we need to use our own implementation to transfer those changes (via push or whatever)?
Of course I reported almost all of this via Feedback Assistant, but considering I had previous feedback for other APIs sit there untouched for years in the past, it's really frustrating and it feels like I'm just talking to myself with those bug reports.
So, did I do something wrong and completely misinterpreted the capabilities and functionality of the ScreenTime API or is it truly broken and non-functional in iOS 15 Beta 2/3?
There's absolutely no mention of these issues in the release notes so I am starting to question my sanity here.