Search results for

DeviceActivityReport

118 results found

Post

Replies

Boosts

Views

Activity

Device Activity Reports are returning a blank screen in release mode
There is an inconsistent issue when views are rendered from the Device Activity Report Extension. This issue is noticeable only on release versions and it works fine in debug mode. Around 80% of the times, the Report Views return blank screen and this is only the case when a weekly/monthly filter is used. Although, it works as expected for daily report views. My questions are: How are all the Report Activity Views working fine in debug mode but not in release mode? How the daily activity filter works fine in the release mode but the weekly/monthly filters don't work? Is this because of a memory limit issue in the extension? As of now, I have the family-controls(distribution) entitlement only for the app and for the extensions I only have family-controls(development) entitlement. Do I need to request for family-controls(Distribution) entitlement even for the extensions? I have seen threads on the forum mentioning the blank screen issue associated with the DeviceActivityReport but haven't found a solut
4
0
1.4k
3w
How Do Commercial Apps Extract Screen Time Data on iOS?
Looking at Brainrot's UI, they display both Screen Time: 6h 31m and a calculated Health: 91/100 score with a Tap to Fix button. This suggests manual sync or a workaround. Specific Questions: Can DeviceActivityReport extensions communicate data back to the main app? (CloudKit, Notifications, Shared files?) Can extensions write to UserDefaults on physical devices? Do commercial apps rely on manual user sync? Is there an alternative API I'm overlooking? Do threshold-based approximations work reliably for daily tracking? I can extract exact minutes in the extension but can't export them to the main app due to sandbox restrictions. Either a technical solution or confirmation that manual sync is the industry standard would help greatly.
1
0
68
Nov ’25
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?
11
0
2.1k
Oct ’25
Foundation Models inside of DeviceActivityReport?
Pretty much as per the title and I suspect I know the answer. Given that Foundation Models run on device, is it possible to use Foundation Models framework inside of a DeviceActivityReport? I've been tinkering with it, and all I get is errors and Sandbox restrictions. Am I missing something? Seems like a missed trick to utilise on device AI/ML with other frameworks.
1
0
486
Oct ’25
FamilyControls entitlement approved, but Provisioning Profile doesn't include deviceActivity & deviceActivityReporting
Hi - appreciate your help in advance! Building a simple habit tracking app. I got approval for FamilyControls distribution. After creating a new provisioning profile with those capabilities enabled, when I try and build in xcode (16.4) using that Profile I get an error stating: Provisioning profile CreateMoreFamilyControlsv2 doesn't include the com.apple.developer.deviceactivity and com.apple.developer.deviceactivity.reporting entitlements I've confirmed bundle identifier matches, Team etc Similarly when i do automatic signing see 3rd screenshot. Not sure what to do at this point, I've heard deviceActivity is automatically applied when family controls is approved but still running into this issue.
2
0
250
Sep ’25
Xcode 16 DeviceActivityReport Extensions Require EXAppExtensionAttributes But App Store Rejects Them
I'm experiencing a conflict between Xcode 16's build requirements and App Store validation for DeviceActivityReport extensions. The Issue: Created a DeviceActivityReport extension using Xcode 16's template Extension builds and runs perfectly locally TestFlight upload fails with Apple saying EXAppExtensionAttributes is incorrect for widget extensions When I remove EXAppExtensionAttributes from Info.plist, local builds fail with: Appex bundle does not define an EXAppExtensionAttributes dictionary Current Info.plist (works locally, rejected by App Store): EXAppExtensionAttributes EXExtensionPointIdentifier com.apple.deviceactivityui.report-extension NSExtension NSExtensionPointIdentifier com.apple.deviceactivityui.report-extension NSExtensionPrincipalClass $(PRODUCT_MODULE_NAME).ActivityReportExtension The Problem: Xcode 16's Device Activity Report Extension template uses fileSystemSynchronizedGroups which appears to require the EX configuration format. But App Store validation rejects this for
1
0
218
Sep ’25
Reply to Screen Time API - Get user total screen time
@Roshan_Owaves 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 As explained in What's new in Screen Time API (starting at the seventh minute), use the DeviceActivityReport extension to access the data.
Topic: App & System Services SubTopic: General Tags:
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
0
190
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
1
0
280
Aug ’25
Reply to Screen Time API - Get user total screen time
[quote='797162021, Roshan_Owaves, /thread/797162, /profile/Roshan_Owaves'] If not, is it expected that this data is only available in the Settings app and not exposed to developers? [/quote] Unfortunately, the only way to access this data is within a sandboxed DeviceActivityReport Extension, as you have correctly stated. So there’s no way for you to extract the data and use it for something else. Seems like Apple is keeping that functionality for themselves. You could try filing a feedback request via https://feedbackassistant.apple.com to make sure they’ll consider adding this.
Topic: App & System Services SubTopic: General Tags:
Aug ’25
Reply to Token Selection from DeviceActivityReport
[quote='729818021, CaliforniaJay, /thread/729818, /profile/CaliforniaJay'] Is there ay way to accomplish passing a token from the sandboxed report extension to my app? [/quote] Unfortunately, this is not possible. As you have stated, tokens are not sensitive data, but Screen Time usage data is. So Apple is not allowing ANY data to leave the sandboxed DeviceActivityReport :/
Topic: App & System Services SubTopic: General Tags:
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
1
0
946
Aug ’25
Reply to Can We Display Screen Time Data in WidgetKit?
[quote='792604021, AleksandrChernyshev, /thread/792604, /profile/AleksandrChernyshev'] Home Screen widget for iOS that displays device usage statistics [/quote] This is not possible unfortunately. The DeviceActivityReport does not work in widgets. But it would be a cool feature for sure! Feedback Requests: FB18927789 FB16409127 I would highly encourage you to file a feedback request on this as well! See also this thread, same issue has already been discussed in 2023 and seems like Apple did not consider the enhancement requests from back then: https://forums.developer.apple.com/forums/thread/724041
Jul ’25
DeviceActivityReport inside SwiftUI Button doesn’t receive tap gestures (ScreenTime API, iOS 17+)
Hi everyone, I’m experimenting with the new ScreenTime DeviceActivityReport view in SwiftUI (iOS 17 / Xcode 15). My goal is to show the report inside a Button (or, more generally, capture any tap on it) so that I can push a detail screen when the user selects it. Here’s the minimal code that reproduces the issue: import FamilyControls import DeviceActivity import SwiftUI struct ScreenTimeView: View { let center = AuthorizationCenter.shared @State private var context: DeviceActivityReport.Context = .init(rawValue: Total Activity) @State private var filter = DeviceActivityFilter( segment: .hourly( during: Calendar.current.dateInterval(of: .day, for: .now)! ), users: .all, devices: .init([.iPhone, .iPad]) ) var body: some View { ZStack { DeviceActivityReport(context, filter: filter) } .onAppear { Task { do { try await center.requestAuthorization(for: .individual) } catch { print(Authorization failed:, error) } } } } } struct ContentView: View { var body: some View { ScrollViewReader { _ in Scro
1
0
199
Jul ’25