Screen Time

RSS for tag

Share and manage web-usage data, and observe changes made to Screen Time settings by a parent or guardian.

Posts under Screen Time tag

114 Posts

Post

Replies

Boosts

Views

Activity

Family Controls entitlement not working on TestFlight (works fine on Xcode build)
I’m developing an app that uses Family Controls to block other apps. I’ve already received approval from Apple for the entitlement, and everything works perfectly when I run the app from Xcode on a physical device. However, when I upload the same build to TestFlight, the app installs and runs, but the Family Controls functionality doesn’t work — it seems like the entitlement isn’t being applied in the TestFlight version. So I’d like to ask: 👉 Do Family Controls entitlements work automatically on TestFlight builds, or is there any additional step required to enable them?
2
0
68
1w
Stuck waiting on Family Controls distribution entitlement, first indie app, looking for guidance/timelines
Hi everyone, solo iOS dev here. I’ve built a small focus app (“Modo”) that uses Apple’s Screen Time APIs to help curb social-media overuse. In development everything works: FamilyActivityPicker for selection, a DeviceActivityMonitor extension for schedules, and ManagedSettings shields (plus uninstall guard only while “Blocked” is active). I requested the Family Controls distribution entitlement so I can ship, but my capability request has been pending for a while and I’m not sure what the usual path forward is. What I’ve already done • Submitted the capability request (Account Holder), describing the use case (self-control / digital well-being), user consent flow,. • Implemented app + DeviceActivityMonitor + ManagedSettingsUI extensions; verified the debug build has the right entitlements and behavior. • Regenerated profiles after the request; checked codesign entitlements on the built targets. • Filed a Developer Support ticket referencing the capability request. I really appreciate any timelines, examples, or advice you can share. If an Apple engineer needs specifics (Team ID, request number), I can provide them as well. Thanks in advance!
1
0
189
2w
Background shield application reliability
Hello! I am working on a screentime app and wondering if anyone has had success achieving reliable background shield application while using com.apple.ManagedSettingsUI.shield-configuration-service? I recently switched from com.apple.deviceactivity.shield-configuration (which worked reliably but isn't accepted by TestFlight) and have not found any consistency getting shields to apply while the app is backgrounded. I believe this is a known limitation of ManagedSettingsUI and want to know if there are successful workarounds or any specific patterns/timing that improve consistency?
1
0
96
2w
Device Activity monitor extension Not working
anyone has the same problem which is that your device activity extension ain't working even tho all the code work perfectly in the console, I setup it in the right way , tried to make schedule and it did the same exact thing when I tried to create usage threshold. anyone know the reason for this bug? here is my extension code import ManagedSettings import FamilyControls import Foundation import OSLog import UserNotifications class MonitoringExtension: DeviceActivityMonitor { private let defaults = UserDefaults(suiteName: "group.com.William.app") private let logger = Logger(subsystem: "com.William.app", category: "MonitoringExtension") override func eventDidReachThreshold(_ event: DeviceActivityEvent.Name, activity: DeviceActivityName) { let activityRaw = activity.rawValue logger.info("Limite atteinte: \(activityRaw)") scheduleNotification(title: "Limite dépassée", body: "Tu as utilisé trop de temps sur \(activityRaw).") guard let data = defaults?.data(forKey: "\(activityRaw)_selection"), let selection = try? JSONDecoder().decode(FamilyActivitySelection.self, from: data) else { logger.warning("Pas de sélection pour \(activityRaw)") return } let store = ManagedSettingsStore() // ← LE SEUL QUI MARCHE store.shield.applications = selection.applicationTokens if !selection.categoryTokens.isEmpty { store.shield.applicationCategories = .specific(selection.categoryTokens) } logger.info("BLOCAGE ACTIF via ManagedSettingsStore.default") } override func intervalDidEnd(for activity: DeviceActivityName) { super.intervalDidEnd(for: activity) let store = ManagedSettingsStore() store.clearAllSettings() // ← Débloque à minuit logger.info("Restrictions levées à la fin de l'intervalle") } private func scheduleNotification(title: String, body: String) { UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .sound]) { granted, _ in guard granted else { return } let content = UNMutableNotificationContent() content.title = title content.body = body let request = UNNotificationRequest(identifier: UUID().uuidString, content: content, trigger: nil) UNUserNotificationCenter.current().add(request) } } }
0
0
163
2w
DeviceActivityMonitor is overcounting screen time for users on iOS 17.6.1
Our app uses a 24-hour DeviceActivityMonitor repeating schedule to send users notifications for every hour of screen time they spend on their phone per day. Notifications are sent from eventDidReachThreshold callbacks at 1, 2, 3, etc, hour thresholds to keep them aware of their screen time. We have recently received an influx of emails from our users that after updating to iOS 17.6.1 their DeviceActivityMonitor notifications are saying their screen time was much higher than what is shown in DeviceActivityReport and their device's Screen Time settings. These users have disabled "Share Across Devices" - but I suspect the DeviceActivityMonitor is still getting screen time from their other devices even though that setting is turned off. Has anybody else noticed this, understands what is causing this, or could recommend a fix that we can tell our users to do?
10
8
1.7k
3w
Disable recording of Screentime for WKWebView with STWebpageController?
Hi, it seems that with iOS26 the system displays two entries in the screentime report for apps that use a WKWebView: one for the app itself and one for the website that was displayed in the app. We don't see this behaviour in iOS18.7. I'm reseaching how to disable the recording for the webviews in one of our apps (written in Swift with UIKit). The STWebpageController looked promising, especially the field suppressUsageRecording, but the whole class is poorly documented. We initialized it with the bundle identifier of the app and set the url of the wkwebview as the url in STWebpageController. It looks a bit like this: webView = WKWebView(frame: .zero, configuration: config) view.addSubview(webView) //setup STWebpageController webpageController = STWebpageController() do { try webpageController!.setBundleIdentifier(bundleIdentifier) } catch{ } webpageController!.suppressUsageRecording = true addChild(webpageController!) view.addSubview(webpageController!.view) webpageController!.view.frame = view.frame webpageController!.didMove(toParent: self) //load url in webView let request = URLRequest(url: url, cachePolicy: .reloadIgnoringLocalCacheData) webview.load(request) webpageController?.url = request.url This has no effect on the recorded screentime for the webview inside our app - we still see the same time for the container app and the included webview. Any suggestions? Thanks, Heiko
0
0
242
4w
Screen Time App Extensions Capabilities
I am building a screen time management app. It has the main app target, and then three extensions - those are the four targets in Xcode. The three extensions are: Shield Device Activity Monitor Device Activity Report Extension I requested "Family Controls (Distribution)" capability from Apple for the main app target / bundle ID, and it got approved. Do I need it for the extensions too? Because previously I had "Family Controls (Development)" for the extensions...
1
0
165
4w
How to open parent app from `ShieldActionDelegate`
Hello, I think it is quite a common use-case to open the parent app that owns the ShieldActionDelegate when the user selects an action in the Shield. There are only three options available that we can do in response to an action: ShieldActionResponse.none ShieldActionResponse.close ShieldActionResponse.defer It would be great if this new one would be added as well: ShieldActionResponse.openParentApp While finding a workaround for now, the problem is that the ShieldActionDelegate is not a normal app extension. That means, normal tricks do not work to open the parent app from here. For example, UIApplication.shared.open(url) does not work because we can’t access UIApplication from the ShieldActionDelegate unfortunately. NSExtensionContext is also not available in the ShieldActionDelegate unfortunately, so that’s also not possible. There are apps however, that managed to find a workaround, in my research I stumbled across these two: https://apps.apple.com/de/app/applocker-passcode-lock-apps/id1132845904?l=en-GB https://apps.apple.com/us/app/app-lock/id6448239603 Please find a screen recording (gif) attached. Their workaround is 100% what I’m looking for, so there MUST be a way to do so that is compliant with the App Store guidelines (after all, the apps are available on the App Store!). I had documented my feature request more than 2 years ago in this radar as well: FB10393561
6
2
1.3k
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
49
Oct ’25
After uninstalling the app, ManagedSettingsStore.shield is still active — seems to be an Apple system behavior
I’m using the shielding API, my code: let store = ManagedSettingsStore() let whitelist = SharedDefaults.whitelistApplications store.shield.applicationCategories = .all(except: whitelist) And to clear the shield, my code is: store.shield.applications = nil store.shield.applicationCategories = nil The issue: Some users report that after uninstalling my app, the shield is still active, and the UI changes to the default iOS system interface. Even after restarting the device, the apps on the phone remains locked, so the user has no way to remove the shield. Recently I’ve received several complaints on social media and App Store comments, accusing my app of being malicious software. This is not a 100% reproducible bug, but it happens frequently enough. I was also able to reproduce it myself by uninstalling the app during an active lock session. Could Apple engineers please look into this issue and advise how to ensure that once the user uninstalls the app, the device is no longer locked?
1
0
158
Oct ’25
iOS 26 regression: `DeviceActivityEvent`: `eventDidReachThreshold` called immediately (instead of waiting till threshold is reached)
Hello! I am experiencing some strange bugs around DeviceActivityEvents: When creating a DeviceActivityEvent we can assign a threshold and applicationTokens. The idea is, that after the user has spent said threshold on said apps, eventDidReachThreshold is called. includesPastActivity is set to false. On iOS 26 however, it happens (quite reliably after updating to a new beta seed) quite often that eventDidReachThreshold is called immediately (after a couple of seconds) instead of waiting for the threshold to be met. Is anyone else seeing similar issues on iOS 26? Only workaround I have found is to ask users to re-grant Screen Time permissions. This only holds for about two weeks though or at most until the next iOS 26 beta update is installed. Feedback filed under: FB18061981 FB18927456
12
3
726
Oct ’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
164
Sep ’25
Family Controls + Device Activity Entitlement Missing from Provisioning Profiles (Xcode, iOS App Extensions)
Hello everyone, I’ve been stuck for weeks on an issue with Family Controls + Device Activity entitlements in my iOS app, and Apple Developer Support has not provided a solution so far. I’m hoping someone here who has successfully implemented Family Controls + Device Activity can point me in the right direction. About the App • The app is a Digital Wellbeing app called Breakloop. • It lets users select apps they want to block, requires them to complete a positive affirmation before opening those apps, and can re-block apps after a set time (e.g., 10 minutes). • This functionality exactly matches the purpose of Family Controls and Device Activity APIs. What Works So Far • Family Controls capability is enabled in the main app target in Xcode. • We have valid Apple Developer certificates (Apple Development) and a team account. • The main app builds and runs fine when using Family Controls alone. • We have App IDs for: • bl.Breakloop (main app) • bl.Breakloop.BreakloopMonitorExtension • bl.Breakloop.BreakloopShieldConfigurationExtension The Problem The provisioning profiles for the extension targets (BreakloopMonitorExtension and BreakloopShieldConfigurationExtension) do not include the com.apple.developer.device-activity entitlement even though: • The App IDs in the Developer Portal have Family Controls (Development) enabled. • The extensions have the correct entitlements file with both: com.apple.developer.family-controls com.apple.developer.device-activity • Xcode Signing & Capabilities points to the correct provisioning profile + certificate. Because the provisioning profiles don’t include the entitlement, the build fails with: Provisioning profile doesn't include the com.apple.developer.device-activity entitlement. What Apple Support Said Apple Support told me: • “Family Controls grants access to Device Activity.” • They cannot enable it manually or guarantee that profiles will include the entitlement. • They sent links to the documentation but no further assistance. What I Need Help With 1. Has anyone successfully built extensions using Family Controls + Device Activity? 2. Do I need to request any additional approval for Device Activity, or should it appear automatically once Family Controls is enabled? 3. Is there a known Xcode or Apple Developer Portal configuration issue that causes the entitlement to be missing in provisioning profiles? 4. Any working example of a project setup that uses Family Controls + Device Activity in extensions would be extremely helpful. Extra Info • We use the latest Xcode + iOS SDK. • Tried recreating certificates, profiles, and App IDs multiple times. • Followed Apple’s docs for Family Controls + Device Activity exactly. I would greatly appreciate any guidance, especially from someone who has this working with iOS app extensions. Thank you!
4
1
581
Sep ’25
Issues with Family Control API: App Blocking & Screen Time for Multiple Children
We are developing a parental control application in SwiftUI with features like app blocking and screen time management. We are using the Family Control API along with Apple Family Sharing, allowing parents to add multiple children to the family group. We have followed the apple documentation still we are facing following issues: App Blocking Issue: The family picker does not display each child's name separately or their apps individually. Instead, it shows all children's apps together, making it difficult to block apps for a specific child. Screen Time Data Issue: We receive the total screen time usage for all children combined rather than separate screen time data for each child. Syncing Delay: When a new child is added to the Family Sharing group, we are unsure how long it takes for their apps to sync and appear on the parent’s device.
2
3
377
Sep ’25
Opening Main App from Screen Time Configuration Action Extension
I'm working on an app for iOS that will help people get tasks done. Within the app, we use a ManagedSettingsStore to let the user setup distracting apps. When the user opens any of those apps while it is being shielded, our ShieldConfiguration target opens and displays a screen that we configure with the description of the task they are supposed to do. On the bottom of the view, there are two buttons, one to start the task, and another to dismiss and return to their home screen. I want to have the button that starts the task open up the main application and deeplink to the focus view with the task that they started. Currently, the only thing that we can tell the system to do is via a ShieldActionResponse which is an enum with 3 cases: none, close, or defer. None of these three allow us to open the main application. I have found no workarounds that allow us to do it either. I've tried creating a custom URL scheme and calling UIApplication.shared.open(url), but there is no shared application available within the action extension. I have tried using a NSExtensionContext to open a url, but that does not work either. I have even tried starting a live activity to show the user what task they are working on and have a live timer, but that does not work either. I know it is technically possible, because an app I downloaded does it perfectly. The app is called "Ascent: Screen Time Control". Is there some sort of extension I am missing, or entitlement I have not requested? Any help would be very appreciated.
1
0
125
Aug ’25
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
Screen Time API - Get user total screen time
I’m trying to integrate Screen Time usage data into my iOS app. The goal is to fetch the total time a user spends on their device (daily or weekly), and store this locally for analysis. So far, I’ve explored the DeviceActivity and FamilyControls frameworks: 1.DeviceActivityReport works but seems tied to extensions that show reports, not directly fetching raw values inside the main app. 2.I haven’t found a way to simply retrieve the total screen-on time (similar to what Settings → Screen Time shows). My questions: 1.Is there any public API that allows retrieving the user’s total Screen Time (like the one shown in Settings)? If yes, what’s the correct approach — should I use 2.DeviceActivityMonitorExtension, FamilyActivitySelection, or another framework? 3.If not, is it expected that this data is only available in the Settings app and not exposed to developers? Any guidance or official confirmation would be really helpful. Thanks in advance!
2
1
128
Aug ’25