Prevent access to the Screen Time API without guardian approval and provide opaque tokens that represent apps and websites.

All subtopics
Posts under Family Controls topic

Post

Replies

Boosts

Views

Activity

ShieldConfiguration: Shield does not update when token is moved from one store to anohter (while in foreground)
Hello, I have noticed that the ShieldConfiguration is only requested when opening a target app, and never when the application token is moved to a different shield while the target app remains in foreground. This causes problems because many times the wrong ShieldConfiguration is displayed (recycled) instead of requesting a new ShieldConfiguration. This bug has been around since the introduction of the Screen Time API in 2020 and is has not been addressed. Bug reports: FB14237883 FB17902392 Please fix asap!! Not acceptable to have bugs not being addressed for more than 5 years. Most concerning: This is still reproducing on iOS 26 beta 7!! Thanks a lot for your help.
0
1
161
Aug ’25
Can't i use metal in the DeviceActivityReportExtension?
i am try to build an app that show beautiful result represent the user activity. but i found that if i write metal code in the View of some DeviceActivityReportScene, the metal code wasn't working. (the same metal code works in other taget) i can switch to canvas, but the perform is bad compare with metal. can use metal? or it is just not working?
0
0
208
Sep ’25
DeviceActivityMonitor will automatically become invalid
I started monitoring using the following code: deviceActivityCenter.startMonitoring( DeviceActivityName(name), during: makeDailySchedule(), events: events ) Where: DeviceActivitySchedule( intervalStart: DateComponents(hour: 0, minute: 0), intervalEnd: DateComponents(hour: 23, minute: 59), repeats: true, warningTime: nil ) In DeviceActivityMonitor, I read and write data using UserDefaults and keep the logic minimal to ensure the size does not exceed 6MB. However, after a period of time, monitoring continues to fail. Why is this happening? How can I resolve this issue?
0
0
103
Sep ’25
Screen Time differences between DeviceActivityMonitor and times shown in DeviceActivityReport
I am still struggling to nail down the screen time between monitoring and showing it in a DeviceActivityReport. It's always off by a couple of percentage points, which results in a difference of a couple of minutes between the time shown for my total screen time in DeviceActivityReport and DeviceActivityMonitor with a threshold set for all apps/websites/categories. In the report, I am looping through all segment (there is only 1 segement using .daily segment interval for a given day) then loop through all categories and all apps within each category and sum up all totalActivityDuration for each app. Based on avaiable documentation, that should corrolate to DeviceActivityMonitor threshold but it doesn't. Are there any differences in how these 2 places count screen time? Are there any apps/core ios services which are excluded from DeviceActivityMonitor. Would appreciate any help at all, I'm losing my mind here. My current suspicion is that Apple Developer documentation is counted twice. i.e. this website https://developer.apple.com/documentation/deviceactivity/deviceactivitymonitor shows up in usage as an App with bundleId of apple.developer.wwdc-release and time spent there is counted twice, against this bundleId AND Safari. I don't know why it's not counted as a webdomain.
0
0
165
Sep ’25
Question about Shield customization limits in ManagedSettingsUI (videos, text length, personalization)
Hi everyone, I’m currently developing a parental control app that uses the Screen Time API (FamilyControls, ManagedSettings, DeviceActivity). I have a question regarding the customization limits of the Shield UI in ManagedSettingsUI. From the documentation, I understand that we can customize the ShieldConfiguration (background color, blur style, icon, title, subtitle, button labels, etc.). However, I’d like to clarify a few points before finalizing the design: 1. Is it allowed (or technically possible) to display custom media content, such as videos, animations, or interactive elements, inside a custom Shield? 2. Are there limitations on the text length for the title and subtitle fields (e.g. maximum number of characters, multiline support, truncation behavior)? 3. Can the Shield be personalized per user (for example, showing a different title or color scheme based on user preferences or device state)? 4. Are there App Store Review restrictions or UI guidelines that define what a Shield should or should not contain (for instance, whether the Shield can resemble a mini-app experience)? I want to ensure that the implementation fully complies with Apple’s technical and design expectations before submission. Thanks in advance for any official clarification or best practices on how far we can go with Shield customization! Best regards, Ferdinand
0
0
37
Oct ’25
DeviceActivityReport failing to load "Code = 2"
Hi! For some reason my DeviceActivityReport sometimes fails to load. I've tried setting up a very simple mock views and displaying a report with a simple "Hello world" but even that won't work. It prints the following error message in the terminal but doesn't show anything else or any context as to what has gone wrong. Failed to update the client's configuration: Error Domain=DeviceActivityReportService.ReportViewController.ClientError Code=2 "(null)" It seems like the "makeConfiguration" method for the report isn't even being invoked. That may though just be an issue with printing messages in the extension. Any help on what could be the issue, or even just a message that you're being the same thing would be greatly appreciated!
0
0
94
Oct ’25
How can I open my app from the restricted screen like many apps in the App Store, one of which is AppLocker?
class ShieldActionExtension: ShieldActionDelegate { override func handle(action: ShieldAction, for application: ApplicationToken, completionHandler: @escaping (ShieldActionResponse) -> Void) { // Handle the action as needed. switch action { case .primaryButtonPressed: if let url = URL(string: "blockfocusapp://") { let extensionContext = NSExtensionContext() extensionContext.open(url, completionHandler: nil) } // completionHandler(.defer) case .secondaryButtonPressed: let userDefaults = UserDefaults(suiteName: "group.in.appsquare.FocusApp.shieldExt") userDefaults?.set(false, forKey: "shouldOpenMainApp") completionHandler(.defer) @unknown default: fatalError() } } override func handle(action: ShieldAction, for webDomain: WebDomainToken, completionHandler: @escaping (ShieldActionResponse) -> Void) { // Handle the action as needed. completionHandler(.close) } override func handle(action: ShieldAction, for category: ActivityCategoryToken, completionHandler: @escaping (ShieldActionResponse) -> Void) { // Handle the action as needed. completionHandler(.close) } } I want to be able to open my app from ShieldActionExtension
0
0
50
Oct ’25
Will special entitlements like Screentime API remain valid when transferring an app?
Certain entitlements require special permission from Apple like DriverKit or Screentime API/Family controls. Those entitlements are tied to the bundle IDs of the app. If those entitlements have been granted for an app from developer A (personal account) and we transfer that app to developer B (organization account), including the bundle IDs, will those bundle IDs keep the entitlement? Or will we need to re-request from the developer account B? Any insights or experiences regarding this process would be greatly appreciated.
1
3
591
May ’25
[iOS 18 Beta 4] DeviceActivityMonitor extension is more likely to deadlock
Hi there, My app uses all the Screen Time API's with individual FamilyControls authorization. I've been using the API's for over 2 years (since they came out). In iOS 18 Beta (maybe started in Beta 3?), I've been experiencing random issues. I tracked it down to where it seems like DeviceActivityMonitor extension is more likely to deadlock in iOS 18. To reproduce: when DeviceActivityMonitorExtension.intervalDidEnd gets called, IF you call DeviceActivityCenter.startMonitoring for that SAME DeviceActivityName from the DeviceActivityMonitorExtension , the startMonitoring call deadlocks (if I pause debugger, it does not advance past DeviceActivityCenter.startMonitoring). The bug is reported in FB14664238. It also contains a sample project where you can reproduce this. I also note in the comment section that this is not the only way to encounter this problem. My application code (which is a lot more complicated) seems to deadlock on calling DeviceActivityCenter.activities. As a result, there seems to be an "overall trend" where, due to some changes, DeviceActivityMonitor extension is more likely to deadlock. The steps are not reproducible on iOS 17.6. This is built using Xcode 17.4. Thank you! 🙏
1
3
758
Mar ’25
Premature DeviceActivityEvent Triggering
Our app monitors device usage and applies a shield when the set time limit is reached. Multiple DeviceActivitySchedules can be present, each with different time limits. To display notifications at 50% of the total limit for each DeviceActivitySchedule, we set a warning time at half of the total time. However, we occasionally receive premature event callbacks. For example, consider a schedule from 13:00 to 13:30 with a single event threshold at 10 minutes and a warning time of 5 minutes. The 'eventDidReachThreshold' callback is delivered prematurely, along with the 'eventWillReachThresholdWarning' callback, at 13:10. Additionally, in some cases, when one DeviceActivitySchedule ends and the next begins immediately, DeviceActivityEvents registered for the new DeviceActivitySchedule are delivered prematurely along with the schedule start callback. For example, consider there are two DeviceActivitySchedules from 12:00 to 13:00 and from 13:00 to 14:00, each with a limit of 10 minutes and a warning time of 5 minutes. When the first schedule ends and the next begins at 13:00, the 'eventDidReachThreshold' callbacks for the events registered in the second schedule are delivered prematurely, along with the 'intervalDidStart' callback.
1
0
405
Nov ’24
Device Activity Report Per hour Screen-time of apps for Graph
Hi everyone, I need to display a Graph based on Screen-time of apps per hour, from 12Am to 11PM. Am able to get the screen-time data for whole day with each app's total screen-time value. Am kind of confused how can I get the per hour screen-time of apps. I have applied filter of day DeviceActivityFilter( segment: .daily( during: Calendar.current.dateInterval( of: .day, for: .now )! ), users: .all, devices: .init([.iPhone, .iPad]) ) Am also using this data to display apps with their usage just like Apple's Screen_time in settings. I need to display exact same graph just like Apple's screen in phone settings for a Day.
1
0
645
Nov ’24
FamilyActivitySelection tokens are invalid for other members in family sharing network
I'm currently working with the FamilyControls API and testing my app on two different devices. Both apps are in the same family-sharing network with one phone being the owner of the network (I'll call this A) and the other one being an adult in the network(I'll call this B). When device A picks apps using the FamilyActivityPicker, it shares that selection with device B (via encoding, sending over network, and decoding on device B). However, interacting with the token (displaying it, using it in shield) throws an error saying the token is null. From the documentation, I thought every token would be the same across all devices in the family sharing network. So my question: How do I send the FamilyActivitySelection from A to B and have the tokens still be functional? Does this functionality only work if A is a "parent" and B is a "child" in the family sharing network? Also, side note: If I reverse the process and send the tokens from B to A. Interacting with the token works exactly as expected. For some reason, it's only going from A to B where it doesn't work.
1
1
483
Mar ’25
FamilyActivitySelection sharing between device in Family Sharing Network
I'm working with the FamilyControls API and am running into an issue with sharing ActivityTokens between devices in the same family sharing network. Based on this documentation, ActivityTokens are only accessible and readable by other members in the family sharing network. My app is based on the idea that if one user selects the Games category in the FamilyActivityPicker, then this token can be shared with another device in the same family-sharing network and this other device can read and display the category. So my question is: If a user in the network selects an activity category in the FamilyActivityPicker, can this category token be shared, read, and used by another user in the family-sharing network?
1
0
400
Dec ’24
Provisioning profile doesn't support Family Controls (Development)
When I attempt to distribute my app in Xcode, I get the following error: Can I resolve the above error by applying for permissions? I learned from this thread that the above application was not approved by email. How can I know whether the application was approved? In addition, from this thread, the review process may take several weeks or even 5 months. Considering that public holiday is coming, how can I speed up this process? ( I have submitted my application) Thank you
1
0
444
Dec ’24
Family Controls (Distribution) Approval Still Pending
I applied for the Family Controls (Distribution) entitlement on November 22nd. But I never received a confirmation email after I submitted the request. I then reached out to support who said they would check with the internal team to at least confirm if I had applied. It's now been 20 days and I have received no updates on the status of my application. This entitlement is existential to my app and I have been completely blocked while waiting for this as I can't even distribute the app on TestFlight. I've considered reapplying again just to be safe, but I am worried that might make things worse. I am a bootstrapped solo founder, and a prolonged delay (or outright denial) of this entitlement would be devastating to me. Does anyone have any advice on where to go from here?
1
1
706
Dec ’24