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

130 Posts

Post

Replies

Boosts

Views

Activity

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
11
2
510
1w
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?
0
0
99
1w
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
129
2w
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
496
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?
0
0
45
3w
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
355
3w
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
98
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
0
143
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
98
Aug ’25
FamilyActivityPicker Crashing / Freezing
Our users report frequent crashes with the FamilyActivityPicker. Since this is a screen controlled by Apple, I'm assuming that there's nothing I can do to prevent these crashes. I'm wondering, though, if there's any way to gracefully handle these crashes? When this happens, the following is printed to the console: [com.apple.FamilyControls.ActivityPickerExtension(1121)] Connection to plugin invalidated while in use. Does anyone know how to handle/catch this error?
4
2
1.2k
Aug ’25
Allowing workaround for FamilyActivityPicker crash
As discussed and acknowledged here, there is a known bug with the FamilyActivityPicker. When a user expands a category that contains enough tokens to exceed the 50mb memory limit, the FamilyActivityPicker crashes. This happens quite frequently for heavy Safari users. An apple engineer mentioned on this thread that WebDomains shown in the picker are present based on the last 30 days of usage data as surfaced by WebKit. Is there any way a user can clear these WebDomains? Either programatically through our app or any other process we can guide them to as a workaround while this issue is getting fixed?
2
2
462
Aug ’25
Bug in Screen Time API: familyActivityPicker dismisses a presenting sheet on iOS 18.4 and above
Hello, I’m presenting the familyActivityPicker from a presented sheet in my application. When I select some apps, categories or websites and tap “Done”, the familyActivityPicker is dismissed but the presenting sheet is also dismissed on iOS 18.4, iOS 18.5, iOS 26 beta 1 and 2. If I tap on “Cancel” from the familyActivityPicker, the sheet is also dismissed on iOS 18.4, iOS 18.5, iOS 26 beta 1 and 2. The same code works perfectly fine on iOS 18.0, iOS 18.1, iOS 18.2 and iOS 18.3. Is this a known-issue? If opened the feedback FB18369821 for this. Regards, Axel
3
0
113
Aug ’25
DeviceActivityReport disappears when app comes back from background
Hello, I am trying to display basic screen time data on my main screen. On the initial load of the screen, the DeviceActivityReport renders correctly and visible, but after being in the background and coming back to the app, the whole view is just blank. I don't think I'm doing anything special. Is this a known bug? @main struct MyActivityReportExtension: DeviceActivityReportExtension { var body: some DeviceActivityReportScene { // Create a report for each DeviceActivityReport.Context that your app supports. TotalActivityReport { totalActivity in TotalActivityView(totalActivity: totalActivity) } // Add more reports here... } } extension DeviceActivityReport.Context { // If your app initializes a DeviceActivityReport with this context, then the system will use // your extension's corresponding DeviceActivityReportScene to render the contents of the // report. static let totalActivity = Self("Total Activity") } struct TotalActivityReport: DeviceActivityReportScene { // Define which context your scene will represent. let context: DeviceActivityReport.Context = .totalActivity // Define the custom configuration and the resulting view for this report. let content: (String) -> TotalActivityView func makeConfiguration(representing data: DeviceActivityResults<DeviceActivityData>) async -> String { // Reformat the data into a configuration that can be used to create // the report's view. let formatter = DateComponentsFormatter() formatter.allowedUnits = [.day, .hour, .minute] formatter.unitsStyle = .abbreviated formatter.zeroFormattingBehavior = .dropAll let totalActivityDuration = await data.flatMap { $0.activitySegments }.reduce(0, { $0 + $1.totalActivityDuration }) return formatter.string(from: totalActivityDuration) ?? "No activity data" } } struct TotalActivityView: View { let totalActivity: String var body: some View { VStack(alignment: .center, spacing: 4) { Text("Screen Time") .font(.system(size: 14, weight: .regular)) .foregroundColor(.secondary) .frame(maxWidth: .infinity, // stretch to the full cell width alignment: .center) Text(totalActivity) .font(.system(size: 18, weight: .medium)) .foregroundColor(.primary) } } } And I am using it in my main view: private var analyticsSection: some View { HStack(spacing: 24) { // Some View DeviceActivityReport(DeviceActivityReport.Context(rawValue: "Total Activity"), filter: DeviceActivityFilter( segment: .weekly( during: Calendar.current.dateInterval( of: .weekOfYear, for: .now )! ), users: .all, devices: .init([.iPhone, .iPad]), )) .frame(maxWidth: .infinity) // another view } .frame(maxWidth: .infinity, maxHeight: showAnalytics ? 58 : 0) .padding(.horizontal, showAnalytics ? 24 : 0) .opacity(showAnalytics ? 1.0 : 0.0) .clipped() }
1
0
187
Aug ’25
Token Selection from DeviceActivityReport
I'd like to allow users to select apps to shield from a DeviceActivityReport (similar to how Apple's Screen Time Settings activity report allows a user to "add limits" to a selected app in the report. What I need to do is pass an appToken from the DeviceActivityReportExtension to my app. I realize the extension is sandboxed and doesn't allow "private" data to be seen outside of the sandbox. The docs state: To protect the user’s privacy, your extension runs in a sandbox. This sandbox prevents your extension from making network requests or moving sensitive content outside the extension’s address space. However, tokens aren't "sensitive". I want to pass a token set out of the sandboxed extension so users can select certain apps from the report that my app can use for setting limits, etc. I thought using App Groups and saving data with UserDefaults with a suiteName for my app group would do it, but it doesn't appear to allow me to pass the token data. Yes I'm using the same KEY for both as I set a config enum to ensure it's the same and I can pass tokens successfully between other extensions/apps in the app group, but not the report extension. It seems the app and the extension have their own stores as the report extension can write to and read from a store but despite being the same suiteName, other apps in the app group don't get or send data to the Report Extension. I realize this is probably due to the design with the sandbox to protect user privacy, however it seems an exception should be made for passing tokens (or even better allow passing through another method like a callback, etc). Is there ay way to accomplish passing a token from the sandboxed report extension to my app?
1
0
874
Aug ’25
Screen Time API, DeviceActivity, Family Controls, Entitlements, Provisioning Profile
Hello everyone, I'm hoping to find a solution for a critical issue that is blocking my app's submission to the App Store. My app uses the Screen Time API and therefore has a main app and a DeviceActivityMonitor extension. The main app has been successfully granted the Family Controls (Distribution) entitlement. However, the DeviceActivityMonitor extension is stuck with only the Family Controls (Development) entitlement. This mismatch causes my build to fail during the archive/distribution process with the error: "Provisioning profile failed qualification. Profile doesn't support Family Controls (Development)." This is a hard blocker, as the extension is a mandatory part of the API. I have already filled out the entitlement request form and also contacted Developer Support (Case #102666581576), who confirmed they could not assist and directed me here. My question is: What is the correct procedure to escalate or resolve the issue of a required extension not receiving the distribution-level Family Controls entitlement after the main app has already been approved? Has anyone else encountered this specific "Development" vs. "Distribution" mismatch and found a definitive way to resolve it? Any guidance would be greatly appreciated. Thank you!
1
0
200
Aug ’25
Family Controls (Distribution) entitlement missing for Device Activity Monitor extension - blocking TestFlight distribution
Hi Apple Developer Community, I'm experiencing an issue with Family Controls entitlements for my iOS app that I'd like to discuss and see if others have encountered similar problems. Background: My app (BrightStart) uses Family Controls to help users build healthy morning routines by temporarily blocking distracting apps until they complete a sunlight exposure session. The core functionality relies on automatic time-based blocking (e.g., block social media apps from 6-8am daily). The Problem: I have Family Controls working perfectly in development builds, but I'm blocked from distributing via TestFlight due to entitlement issues with my Device Activity Monitor extension. Technical Details: Main app bundle ID: app.brightstart.app ✅ Has both "Family Controls (Development)" and "Family Controls (Distribution)" options available Extension bundle ID: app.brightstart.app.BrightStartMonitorExtension ❌ Only shows "Family Controls (Development)" - no Distribution option Error when archiving for TestFlight: ❌ Provisioning profile failed qualification Profile doesn't support Family Controls (Development). Family Controls (Development) feature is for development only. Please use Family Controls (Distribution) for distribution. Impact: Cannot upload to TestFlight for beta testing Native FamilyActivityPicker falls back to mock UI in distributed builds Automatic scheduled app blocking (via DeviceActivityMonitor) doesn't function in production Questions for the community: Has anyone successfully gotten "Family Controls (Distribution)" enabled for a Device Activity Monitor extension? Is this a known limitation, or should I expect this option to be available? Are there alternative approaches for time-based automatic app blocking that work in distribution builds? Should I contact Apple Support directly about enabling this entitlement for the extension? Btw, Cursor wrote this summary above, so it could be just hallucinating the issue? Would really appreciate anyone's thoughts here.
1
0
196
Aug ’25
Device Activity Privacy Restrictions
Hey there! So, I'm trying to see what I'm able to do with the Device Activity Report Extension, and I have a few questions about the following quote: To protect the user’s privacy, your extension runs in a sandbox. This sandbox prevents your extension from making network requests or moving sensitive content outside the extension’s address space. In particular, what constitutes the address space for this extension? Can I save data to a UserDefaults object that only the extension can access? (Apps like Opal allow the user to label apps as "distracting" and "non-distracting", and I'm wondering how they do that!) From what I've read, I believe it cannot write to a shared app group or model (and I just want to confirm this) It also seems that there's nothing preventing it from reading data from the main app, so I'm just wondering if it's able to read data from an app group or model with no problem. Thanks in advance!
0
0
109
Aug ’25
Screen Time Counting App Usage While Shield Is Displayed
Hi all, I’m working on a Screen Time app using Managed Settings and ShieldConfiguration, and I’ve run into an issue where screen time is still being counted while the shield is shown — even when the user never interacts with the underlying app content. This happens both when I use the default shield and when I configure a custom ShieldConfiguration with a ShieldAction. As long as the shield is visible, the time appears to count toward the app’s usage. For example, if I leave the shield up for 20 minutes, Screen Time logs it as 20 minutes of app usage — even if no content is accessed behind the shield. Is this expected behavior? Is there a way to prevent Screen Time from counting time while the shield is shown? Any insights or workarounds would be greatly appreciated! Thanks, Connor
2
1
123
Jul ’25