Is the Screen Time API completely broken in the betas?

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 whether FamilyActivityPicker 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 an MonitoringError.unauthorized error.

  • AuthorizationCenter.requestAuthorization error in callback cannot be mapped back to FamilyControlsError because it is a plain NSError with an error code and FamilyControlsError 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 the NSExtensionPointIdentifier 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.

  • Issue with iOS 15.1.

    I implement the screen time API and restriction applications on the kid's device. However, I did not receive the shield once that time of some app had expired.. Also, I didn't see a kid device's apps restriction for selection by familyActivityPicker on the parent device.

    Also, I didn't see a kid device's apps restriction for selection by familyActivityPicker on the parent device. Please provide the necessary support.

  • It has been a seriously long time.. is there any solution to this?

Add a Comment

Replies

Looking at the API documentation it is not at all clear to me if and how I could use the API to simply display the screentime of other apps inside my own app and secondly to trigger code in my app (in a background process) whenever a threshold is reached in terms of screentime of other apps. In that case the iOS operating system should open up my app and trigger some code. I am not interested in these generic 'shield' screens, I want to open my app and continue from thereon when a threshold is reached. Can somebody confirm if this is possible with this new API?

Thank you!, J

  • None of that is possible with the existing API. You do not get access to ScreenTime stats, nor can you display your own shield (or switch to your app).

Add a Comment