<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "DeviceActivity",
  "identifier" : "/documentation/DeviceActivity/DeviceActivityCenter",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Device Activity"
    ],
    "preciseIdentifier" : "s:14DeviceActivity0aB6CenterV"
  },
  "title" : "DeviceActivityCenter"
}
-->

# DeviceActivityCenter

A class that enables an application’s extension to start monitoring scheduled device activity.

```
struct DeviceActivityCenter
```

## Overview

Activity begins when someone first uses a device within the scheduled time interval and
ends when someone first uses the device outside of the interval.
The system only invokes the [`intervalDidStart(for:)`](/documentation/DeviceActivity/DeviceActivityMonitor/intervalDidStart(for:))
and [`intervalDidEnd(for:)`](/documentation/DeviceActivity/DeviceActivityMonitor/intervalDidEnd(for:)) when the device is
in use. Likewise, the system invokes the [`eventDidReachThreshold(_:activity:)`](/documentation/DeviceActivity/DeviceActivityMonitor/eventDidReachThreshold(_:activity:))
function when an event reaches its threshold.

## Topics

### Monitoring Device Activities

[`init()`](/documentation/DeviceActivity/DeviceActivityCenter/init())

Creates an activity center to manage which device activities your application monitors.

[`startMonitoring(_:during:events:)`](/documentation/DeviceActivity/DeviceActivityCenter/startMonitoring(_:during:events:))

Starts monitoring the specified device activity.

[`stopMonitoring(_:)`](/documentation/DeviceActivity/DeviceActivityCenter/stopMonitoring(_:))

Stops monitoring the specified device activities.

[`activities`](/documentation/DeviceActivity/DeviceActivityCenter/activities)

The activities that the application’s extension currently monitors.

### Getting the Events and Schedules

[`events(for:)`](/documentation/DeviceActivity/DeviceActivityCenter/events(for:))

Fetches the events of a device activity.

[`schedule(for:)`](/documentation/DeviceActivity/DeviceActivityCenter/schedule(for:))

Fetches the schedule of a device activity.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)