Search results for

“DeviceActivityReport”

127 results found

Post

Replies

Boosts

Views

Activity

Reply to Grabbing the current remaining threshold minutes from a DeviceActivity schedule?
While there is not a way to do this directly using a DeviceActivityCenter or any of the DeviceActivityEvent APIs, you can create a DeviceActivityReport and configure its filter so that your app's DeviceActivityReportExtension gets usage data for the tokens in your DeviceActivityEvent. Your extension can then subtract the totalActivityDuration from the event's threshold in seconds to get the remaining amount of time.
Topic: App & System Services SubTopic: General Tags:
Aug ’22
DeviceActivityReport based views are blank on iOS 16 whith apps built with Xcode 15 beta
Hi ! We are super exited to switch to Xcode 15 when it will be released, but we have a major issue : Apps built with Xcode 15 beta fail to show DeviceActivityReport base view on iOS 16. The following message shows in the console : ] [default] LaunchServices: store (null) or url (null) was nil: Error Domain=NSOSStatusErrorDomain Code=-54 process may not map database UserInfo={NSDebugDescription=process may not map database, _LSLine=66, _LSFunction=_LSServer_GetServerStoreForConnectionWithCompletionHandler} 2023-07-31 14:54:12.568332+0200 Opal[57940:4651501] [default] Attempt to map database failed: permission was denied. This attempt will not be retried. 2023-07-31 14:54:12.568420+0200 Opal[57940:4651501] [db] Failed to initialize client context with error Error Domain=NSOSStatusErrorDomain Code=-54 process may not map database UserInfo={NSDebugDescription=process may not map database, _LSLine=66, _LSFunction=_LSServer_GetServerStoreForConnectionWithCompletionHandler} We Opened a bug report at the end
8
0
3.2k
Aug ’23
Reply to How to detect Device activity on iOS ?
Yes, you can use the FamilyControls framework's AuthorizationCenter to request access to the DeviceActivity framework. Once the user grants your app access to Screen Time data, it can use a DeviceActivityReport rendered by your app's Device Activity Report extension to display usage data for that device.
Topic: App & System Services SubTopic: General Tags:
Feb ’23
Recently used applications on guardian phone - FamilyControls, DeviceActivityReport
For an iOS app that runs in both child and parent mode across iOS devices. On the child device, with Family Controls enabled using .child permissions via AuthorizationCenter.requestAuthorization(for: .child). Is any way to display a list of recently used apps by the child on the parent (guardian) device, in a privacy-preserving and Apple-compliant way?
1
0
190
May ’25
Reply to [iOS 17] Screen Time connection breaks randomly multiple times per day
We experience the same issue on our app, and we filled a bug report as well -> FB12235755. The issue seems to happen when screentime permission have been granted prior to iOS 17. In our testing, everything based on DeviceActivityReport fails to render until you reinstall the app. here's what we see in the logs: Failed to discover the client's extension: Error Domain=DeviceActivityReportService.ReportViewController.ClientError Code=2 (null) VS terminated with error: Error Domain=_UIViewServiceErrorDomain Code=1 (null) UserInfo={Terminated=disconnect method} I agree this is a big concern for us as well, we don't want to ask all of our users to reinstall the app after updating to iOS 17. This is also showing how little control we have on DeviceActivityReport views, we cannot know if they are loading, if they errored with the public API, we opened a enhancement radar on this about a year ago (FB10754858).
Topic: App & System Services SubTopic: General Tags:
Jun ’23
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
Reply to Struggling to display DeviceActivityReport view in a widget
[quote='743998022, Frameworks Engineer, /thread/724041?answerId=743998022#743998022'] Unfortunately, displaying a DeviceActivityReport in a widget is not currently supported. Please file an enhancement request using Feedback Assistant. Thanks in advance! [/quote] Hello @Frameworks Engineer! Is there any update on this? It’s now exactly two years since this was brought up…
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’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
Reply to Family Activity Picker | Screen Time API features iOS 16
You can use a Label to display the icon and name of apps selected in a FamilyActivityPicker: https://developer.apple.com/documentation/familycontrols/displayingactivitylabels Alternatively, it is also possible to display the localized names and bundle identifiers (as well as usage data) for apps selected by the user in a FamilyActivityPicker by creating a Device Activity report app extension and then displaying a DeviceActivityReport with a filter containing the desired tokens.
Topic: App & System Services SubTopic: General Tags:
Jan ’23
Reply to HELP ScreenTime API DeviceAcivityReport continious issues
@pravinu that's 100% impossible because Device Activity Report Extension is in the sandbox that can read data but can't write to any storage or make any network calls 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 https://developer.apple.com/documentation/deviceactivity/deviceactivityreport
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’24
Reply to Device Activity Report View Size and Background
Hi @caleb4hzglory, yh im having same issue as @JosephCa not being able to see anything from my content view when i add the DeviceActivityReport. Can you share with us some code snippet or idea how you get working on physical device please thank you
Topic: Privacy & Security SubTopic: General Tags:
Replies
Boosts
Views
Activity
Feb ’24
Reply to DeviceActivityReport based views are blank on iOS 16 whith apps built with Xcode 15 beta
Hi everyone ! Apple just announced that Xcode 15 will be mandatory to publish app updates starting April 2024 (https://developer.apple.com/ios/submit/) This is making this bug critical as we will have to drop iOS 16 if we want to update our apps containing DeviceActivityReport.
Replies
Boosts
Views
Activity
Feb ’24
Reply to Grabbing the current remaining threshold minutes from a DeviceActivity schedule?
While there is not a way to do this directly using a DeviceActivityCenter or any of the DeviceActivityEvent APIs, you can create a DeviceActivityReport and configure its filter so that your app's DeviceActivityReportExtension gets usage data for the tokens in your DeviceActivityEvent. Your extension can then subtract the totalActivityDuration from the event's threshold in seconds to get the remaining amount of time.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Aug ’22
Reply to How to show Application Icons within usage report - DeviceActivityReport
You can use the Applications returned from your DeviceActivityReport extension, and in your app use the token from those applications to initialize labels. See more about displaying activity labels here. Label(applicationTokenFromYourExtension).labelStyle(.iconOnly) should get you just the application icon, if you wish.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Oct ’22
DeviceActivityReport based views are blank on iOS 16 whith apps built with Xcode 15 beta
Hi ! We are super exited to switch to Xcode 15 when it will be released, but we have a major issue : Apps built with Xcode 15 beta fail to show DeviceActivityReport base view on iOS 16. The following message shows in the console : ] [default] LaunchServices: store (null) or url (null) was nil: Error Domain=NSOSStatusErrorDomain Code=-54 process may not map database UserInfo={NSDebugDescription=process may not map database, _LSLine=66, _LSFunction=_LSServer_GetServerStoreForConnectionWithCompletionHandler} 2023-07-31 14:54:12.568332+0200 Opal[57940:4651501] [default] Attempt to map database failed: permission was denied. This attempt will not be retried. 2023-07-31 14:54:12.568420+0200 Opal[57940:4651501] [db] Failed to initialize client context with error Error Domain=NSOSStatusErrorDomain Code=-54 process may not map database UserInfo={NSDebugDescription=process may not map database, _LSLine=66, _LSFunction=_LSServer_GetServerStoreForConnectionWithCompletionHandler} We Opened a bug report at the end
Replies
8
Boosts
0
Views
3.2k
Activity
Aug ’23
Reply to How to detect Device activity on iOS ?
Yes, you can use the FamilyControls framework's AuthorizationCenter to request access to the DeviceActivity framework. Once the user grants your app access to Screen Time data, it can use a DeviceActivityReport rendered by your app's Device Activity Report extension to display usage data for that device.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Feb ’23
Recently used applications on guardian phone - FamilyControls, DeviceActivityReport
For an iOS app that runs in both child and parent mode across iOS devices. On the child device, with Family Controls enabled using .child permissions via AuthorizationCenter.requestAuthorization(for: .child). Is any way to display a list of recently used apps by the child on the parent (guardian) device, in a privacy-preserving and Apple-compliant way?
Replies
1
Boosts
0
Views
190
Activity
May ’25
Reply to Label from ApplicationToken Inside of DeviceActivityReport Not Showing
UPDATE: So it seems that the reason this is failing is because the Family Controls entitlement is required by the DeviceActivityReport Extension as well. When I add the development entitlement back to that, it works properly. The ActivityMonitorExtension also seems to require the capability in order to work properly. Had to send 2 new capability requests...
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’25
Reply to [iOS 17] Screen Time connection breaks randomly multiple times per day
We experience the same issue on our app, and we filled a bug report as well -> FB12235755. The issue seems to happen when screentime permission have been granted prior to iOS 17. In our testing, everything based on DeviceActivityReport fails to render until you reinstall the app. here's what we see in the logs: Failed to discover the client's extension: Error Domain=DeviceActivityReportService.ReportViewController.ClientError Code=2 (null) VS terminated with error: Error Domain=_UIViewServiceErrorDomain Code=1 (null) UserInfo={Terminated=disconnect method} I agree this is a big concern for us as well, we don't want to ask all of our users to reinstall the app after updating to iOS 17. This is also showing how little control we have on DeviceActivityReport views, we cannot know if they are loading, if they errored with the public API, we opened a enhancement radar on this about a year ago (FB10754858).
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jun ’23
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:
Replies
Boosts
Views
Activity
Aug ’25
Reply to Struggling to display DeviceActivityReport view in a widget
[quote='743998022, Frameworks Engineer, /thread/724041?answerId=743998022#743998022'] Unfortunately, displaying a DeviceActivityReport in a widget is not currently supported. Please file an enhancement request using Feedback Assistant. Thanks in advance! [/quote] Hello @Frameworks Engineer! Is there any update on this? It’s now exactly two years since this was brought up…
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’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:
Replies
Boosts
Views
Activity
Aug ’25
Reply to Family Activity Picker | Screen Time API features iOS 16
You can use a Label to display the icon and name of apps selected in a FamilyActivityPicker: https://developer.apple.com/documentation/familycontrols/displayingactivitylabels Alternatively, it is also possible to display the localized names and bundle identifiers (as well as usage data) for apps selected by the user in a FamilyActivityPicker by creating a Device Activity report app extension and then displaying a DeviceActivityReport with a filter containing the desired tokens.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jan ’23
Reply to HELP ScreenTime API DeviceAcivityReport continious issues
@pravinu that's 100% impossible because Device Activity Report Extension is in the sandbox that can read data but can't write to any storage or make any network calls 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 https://developer.apple.com/documentation/deviceactivity/deviceactivityreport
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’24