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

# DeviceActivityEvent

An event that represents an application, category, or website activity.

```
struct DeviceActivityEvent
```

## Overview

Device activity is the amount of time an application, category, or web domain is frontmost on the screen and
accumulates based on the time zone of the scheduled start date. Web domain activity includes domains visited in
Safari or any third-party browser that contributes web usage via a `STWebpageController`.

## Topics

### Creating an Event

[`init(applications:categories:webDomains:threshold:)`](/documentation/DeviceActivity/DeviceActivityEvent/init(applications:categories:webDomains:threshold:))

Creates a new event.

[`DeviceActivityEvent.Name`](/documentation/DeviceActivity/DeviceActivityEvent/Name)

The unique name of an event.

[`includesAllActivity`](/documentation/DeviceActivity/DeviceActivityEvent/includesAllActivity)

A Boolean value that indicates whether the event includes all applications, categories, and web domains.

### Including Objects in an Event

[`applications`](/documentation/DeviceActivity/DeviceActivityEvent/applications)

The applications that the event includes.

[`categories`](/documentation/DeviceActivity/DeviceActivityEvent/categories)

The categories that the event includes.

[`webDomains`](/documentation/DeviceActivity/DeviceActivityEvent/webDomains)

The web domains that the event includes.

[`threshold`](/documentation/DeviceActivity/DeviceActivityEvent/threshold)

The amount of time to monitor the provided applications, categories, and web domains.



---

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)