Meet the Screen Time API

RSS for tag

Discuss the WWDC21 session Meet the Screen Time API.

Posts under wwdc21-10123 tag

73 Posts

Post

Replies

Boosts

Views

Activity

Apps installed on child device is not showing on Parent Device
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.
2
0
1.4k
Feb ’25
When "Family Control" will be available for AppStore and AdHoc distribution?
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)
6
0
4.1k
Sep ’23
Screen Time Guardian App Questions
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.
7
0
3.9k
Aug ’23
ScreenTime API on non-Family Sharing Devices
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.
7
0
5.7k
May ’22
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.
19
0
12k
May ’22
Device Activity Extension not being called
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!
2
0
2.4k
May ’22
When "Family Control" will be available for AppStore and AdHoc distribution?
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]
0
0
753
May ’22
shielding and blocking apps
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?
2
0
3.1k
Apr ’22
Unable to call Device Activity in Screen Time Api From Parent Device
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>
0
0
863
Apr ’22
Swift Screen time Api error (family controls error code=2 )
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?
0
0
927
Mar ’22
Unable to get token from Family Activity Picker Screen Time API With Parent's device
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?
5
0
1.7k
Mar ’22
Is the Screentime API properly developed/documented?
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.
0
0
673
Mar ’22
familycontrolserror code=2 on on child devices
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)")         }
0
0
781
Mar ’22
Apps installed on child device is not showing on Parent Device
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.
Replies
2
Boosts
0
Views
1.4k
Activity
Feb ’25
When "Family Control" will be available for AppStore and AdHoc distribution?
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)
Replies
6
Boosts
0
Views
4.1k
Activity
Sep ’23
Sample code
Can you please make the sample code for the screen time api available?
Replies
6
Boosts
0
Views
2.1k
Activity
Sep ’23
Screen Time Guardian App Questions
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.
Replies
7
Boosts
0
Views
3.9k
Activity
Aug ’23
FamilyActivitySelection : Issue trying to store applications into UserDefaults
Hi, Has anyone managed to store applications, categories or webDomains from FamilyActivitySelection into UserDefaults ? Application or Category is not Codable. How do we encode this into JSON? Thanks for your help
Replies
2
Boosts
0
Views
1.5k
Activity
Jul ’22
FamilyActivityPicker showing categories only but with no apps
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.
Replies
1
Boosts
0
Views
1.8k
Activity
May ’22
ScreenTime API on non-Family Sharing Devices
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.
Replies
7
Boosts
0
Views
5.7k
Activity
May ’22
Can I manage restrictions from the parent's application?
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?
Replies
4
Boosts
0
Views
2.1k
Activity
May ’22
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.
Replies
19
Boosts
0
Views
12k
Activity
May ’22
Device Activity Extension not being called
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!
Replies
2
Boosts
0
Views
2.4k
Activity
May ’22
When "Family Control" will be available for AppStore and AdHoc distribution?
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]
Replies
0
Boosts
0
Views
753
Activity
May ’22
Coding Swift
When I am coding my app the first line of my code say that there is an error due to "expressions are not allowed at the top level" can somebody please help me.
Replies
1
Boosts
0
Views
1.1k
Activity
Apr ’22
shielding and blocking apps
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?
Replies
2
Boosts
0
Views
3.1k
Activity
Apr ’22
Unable to call Device Activity in Screen Time Api From Parent Device
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>
Replies
0
Boosts
0
Views
863
Activity
Apr ’22
Limit app usage with Screen Time API
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?
Replies
1
Boosts
0
Views
2.8k
Activity
Mar ’22
Swift Screen time Api error (family controls error code=2 )
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?
Replies
0
Boosts
0
Views
927
Activity
Mar ’22
Unable to get token from Family Activity Picker Screen Time API With Parent's device
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?
Replies
5
Boosts
0
Views
1.7k
Activity
Mar ’22
familyActivityPicker WebDomain selection not visible
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?
Replies
1
Boosts
0
Views
1.5k
Activity
Mar ’22
Is the Screentime API properly developed/documented?
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.
Replies
0
Boosts
0
Views
673
Activity
Mar ’22
familycontrolserror code=2 on on child devices
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)")         }
Replies
0
Boosts
0
Views
781
Activity
Mar ’22