Meet the Screen Time API

RSS for tag

Discuss the WWDC21 session Meet the Screen Time API.

View Session

Posts under wwdc21-10123 tag

62 Posts
Sort by:
Post not yet marked as solved
0 Replies
165 Views
On authorized child app FamilyActivityPicker randomly stops displaying apps. All categories are visible but sometimes under categories showing no apps. I have added a workaround to call FamilyAuthorization every time before calling FamilyActivityPicker this improves the issue a bit but still around 30% it stops listing apps.
Posted
by AsifmDev.
Last updated
.
Post marked as solved
5 Replies
2.4k Views
Hello, thank you for building a Screen Time API. In my reading of of the API, it seems that all components rely on Family Controls, which require a parent to authorize on a child's device. Will Screen Time API work in contexts where there are no children's devices? Can an individual authorize Family Controls on their own phone? Here is a use case: Imagine a user who wants to restrict access to certain apps until they have worked out for 30 minutes a day. We would use Device Activity and Managed Settings to effectuate this app.
Posted
by fstutzman.
Last updated
.
Post not yet marked as solved
2 Replies
1.5k Views
WWDC21 session 10123 shows a screen that implies the guardian instance of your app is able to select apps on your child's device to encourage or to control. In my experience with the API so far I can't see a way to do this. The API only seems to work on the child's phone. Here are my questions: Is there a suggested way to determine whether the app is running on a guardian device? The only way I can see is to attempt AuthorizationCenter.shared.requestAuthorization and check for an error value of .invalidAccountType. But it seems you could get that error for other reasons too. Is there a way to present FamilyActivityPicker on the guardian device but have it show apps on the child's phone? I don't see any thing in the API for selecting a child account to access with `FamilyActivityPicker', it seems to only show the phone's user's apps (or no apps if it's the guardian's phone). After retrieving app tokens from 'FamilyActivityPicker' is there a recommended way to present to the user in the UI? The WWDC session shows an app icon and app name (i.e. "Books" and "Solar System"), but my understanding is that info is hidden from the developer for privacy reasons. So I'm wondering if the example in the session is really feasible.
Posted
by pinch.
Last updated
.
Post not yet marked as solved
3 Replies
915 Views
I managed to achieve the list of children's applications on the parent device. But I can't manage restrictions for these applications. Is it only available from the child's device or there is a solution for the app management from the parent's app?
Posted
by yuraist.
Last updated
.
Post not yet marked as solved
16 Replies
5.1k Views
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.
Posted
by clawoo.
Last updated
.
Post marked as solved
1 Replies
237 Views
Hi all, I am facing a problem following the code in the "Meet the Screen Time API" video. I've tried scheduling the monitoring time from 00:00 to 25:59 or some other time but functions in DeviceActivityMonitor are never being called. I tried to print log from those functions, nothing shown. Is there any settings I've missed? In addition, I already changed the NSExtensionPrincipalClass value to my class name. Any help would be appreciated!
Posted
by g0mi.
Last updated
.
Post not yet marked as solved
0 Replies
166 Views
Hello! Does anybody know the release date of "Family Control" capability for Distribution? iOS 15 was released, but "Family Control" is still available only for Development Distribution: We can't create a Distribution provision profile for testing via TestFlight right now.  is the API now available for app-store releases? and if not, are there any timelines when it will be available for market releases? Or Any possibility of getting it released with the upcoming iOS 16? [*Reposting this question to know the latest updates]
Posted Last updated
.
Post marked as solved
4 Replies
938 Views
Hello! Does anybody know release date of "Family Control" capability for Distribution? iOS 15 was released, but "Family Control" is still available only for Development Distribution: We can't create Distribution provision profile for testing via TestFlight right now. Furthermore we can't proof that Content Filter Providers will be work on authorized Family Control devices without any restrictions and additional setup (see Content Filter Providers with Family Control app)
Posted Last updated
.
Post marked as solved
2 Replies
899 Views
i'm trying to shield and block apps on child device. i managed to block apps by creating a  variable blockedApps : Set = Set() that contains a list of applications like Application(bundleIdentifier: "com.apple.calculator") inside the intervalDidStart on my DeviceActivityMonitor extension now i'm trying to shield an app using the same extension and nothing happens. for this i used this code inside intervalDidStart:   let calculatorApp = Application(bundleIdentifier: "com.apple.calculator")     var blockedApps : Set = Set()           guard let token = calculatorApp.token else {       return     }     blockedApps = [token]     store.shield.applications = blockedApps and i cant tell what is the reason for this not working is there a token issue that is nil? does shielding requires a different app extension? does my app extension requires some additional configuration maybe a different NSExtensionPointIdentifier?
Posted
by vova085.
Last updated
.
Post not yet marked as solved
0 Replies
218 Views
Using shared authorization I am able to authorize the child's device and able to see all the installed apps on the child's mobile on the parent device. But when I am trying to call DeviceActivity nothing happens. This is how I am calling DeviceActivity override func intervalDidStart(for activity: DeviceActivityName) { super.intervalDidStart(for: activity) } override func intervalDidEnd(for activity: DeviceActivityName) { super.intervalDidEnd(for: activity) } override func eventDidReachThreshold(_ event:DeviceActivityEvent.Name,activity:DeviceActivityName){ super.eventDidReachThreshold(event, activity: activity) } } info.plist <key>NSExtension</key> <dict> <key>NSExtensionPointIdentifier</key> <string>com.apple.deviceactivity.monitor-extension</string> <key>NSExtensionPrincipalClass</key> <string>$(PRODUCT_MODULE_NAME).DeviceActivityMonitorExtension</string> </dict>
Posted Last updated
.
Post marked as solved
1 Replies
279 Views
I wanted to create an app that based on some conditions would limit some apps usage via Screen Time. I know that with the Screen Time API it is possible to limit apps only if there is a guardian or a parent in the family, but I need to limit usage directly on the user device without a guardian or parent. Is there any way to do it?
Posted
by bortolo.
Last updated
.
Post not yet marked as solved
0 Replies
240 Views
I'm try to physical device always getting error on Error for Family Controls: Error Domain=FamilyControls.FamilyControlsError Code=2 "(null)" AuthorizationCenter.shared.requestAuthorization{result in       switch result {       case .success():         print("Allow to controle App ")         break       case .failure(let error):         print("Error for Family Controls: \(error)")       }     } My question is - how can I authorize my parents using Family Control API in order to use for example Device Activity framework and Managed Settings framework?
Posted Last updated
.
Post not yet marked as solved
1 Replies
568 Views
I've created a test project in which I can successfully receive the FamilyControl authorization for the child's device. In child device, no issue: My project can show family Activity Picker successfully. Using "selection.applicationTokens", I can get tokens that I choice. In Parent device, problem: My project can show family Activity Picker successfully as well, I can see the application list. But when I try to get a token using"selection.applicationTokens", it's empty. The same problem was also found on Beta8. Can someone please help me?
Posted
by Miki2021.
Last updated
.
Post not yet marked as solved
0 Replies
457 Views
In familyActivityPicker I can select Apps and Categories but there is no way to add websites. In Apple own screentime App same control (familyActivityPicker) provides a way to add websites. Is there some sort of settings/entitlement or capability required to added in the project?
Posted
by AsifmDev.
Last updated
.
Post not yet marked as solved
0 Replies
220 Views
Can you please provide the link to the demo app shown in the video? This will help the dev community looking to build useful applications more than anything else. Is there good documentation available on error handling for FamilyControls Error? Can you bring up FamilyActivityPicker remotely from the parent device for a specific child's iPad or iPhone? I can only bring up a family activity picker on a child's device which means that the child can change the selection at will? Blocking games doesn't seem to work. "Among us" in online multiplayer mode can't be blocked.
Posted
by avi_dra.
Last updated
.
Post not yet marked as solved
0 Replies
272 Views
I'm try to physical device always getting error on Error for Family Controls: Error Domain=FamilyControls.FamilyControlsError Code=2 "(null)" AuthorizationCenter.shared.requestAuthorization { result in                  switch result {         case .success():           break         case .failure(let error):           print("Error for Family Controls: (error)")         }
Posted Last updated
.
Post not yet marked as solved
0 Replies
281 Views
Hello, Thank you Chris & Nolan for the wonderful Screen Time API demo! I would like to apply this new functionality to limit a child's communication with a specific contact selected by a parent during, "Homework" hours. I would like to configure the shield to ONLY restrict the chat log of the specified contact, not the entire Messages application. At the end of "Homework" hours I would like the child to be able to view any missed messages or calls they received, while this contact was restricted. It does not appear that a parent can specify communication limits within managed settings without using lockCellularPlan or shielding the entire app with the familyactivitypicker. Can we configure downtime restrictions using this API? If you could point me to the correct part of the framework so I can further investigate how to implement this, that would be very helpful. Thank you!
Posted Last updated
.
Post not yet marked as solved
0 Replies
286 Views
I am creating a prototype with the new Screen Time API introduced by Apple. The issue I am facing is, Applications installed in child device is not showing in parent device with FamilyActivityPicker. It is showing in Child device and apps can be shielded from child's device. Can some one describe, how to list the apps in parent's device. Both Device are running in iOS 15.3. Both falls in same family group Child is under 13 yrs old Screen Time enabled in both device and parent device can see child in Screen Time.
Posted
by mahin2022.
Last updated
.