DeviceActivity lets an extension monitor and respond to scheduled Screen Time device-activity intervals and usage events on iOS, macOS, and watchOS. You define a DeviceActivitySchedule and DeviceActivityEvent, then register them with a DeviceActivityCenter under a DeviceActivityName so your extension is invoked when an interval begins or ends or a usage threshold is reached. To present collected usage, you build a report by adopting DeviceActivityReportExtension and DeviceActivityReportScene, querying DeviceActivityData and DeviceActivityResults through a DeviceActivityFilter.
Monitoring Device Activity 2
Register schedules and events with the activity center to be invoked when intervals begin or end or usage thresholds are reached.
- StDeviceActivityCenterA class that enables an application's extension to start monitoring scheduled device activity.
- StDeviceActivityNameThe unique name of an activity.
Schedules and Events 2
Describe the recurring intervals and usage thresholds that trigger your monitoring extension.
- StDeviceActivityScheduleA calendar-based schedule for when to monitor a device's activity.
- StDeviceActivityEventAn event that represents an application, category, or website activity.
Building Activity Reports 2
Adopt these extension and scene protocols to present collected usage data in a report.
- PrDeviceActivityReportExtensionAn app extension that reports device activity data.
- PrDeviceActivityReportSceneDefines a custom device activity report scene.
Querying Usage Data 3
Filter and read the device-activity data and results that back your report.
- StDeviceActivityFilterA type that filters the device activity data to include in a report.
- StDeviceActivityDataRepresents the activity of a ``User`` on a particular ``Device``.
- StDeviceActivityResultsAn asynchronous sequence of filtered device activity results.
Classes 2
- ClDeviceActivityAuthorization
- ClDeviceActivityMonitorThe object that monitors scheduled device activity.
Structures 2
- StDeviceActivityReportA view that reports the user's application, category, and web domain activity in a privacy-preserving way.
- StDeviceActivityReportBuilderA result builder that combines one or more `DeviceActivityReportScene`s into a single scene.
Protocols 1
- PrDeviceActivityAuthorizing