<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "DeviceActivity",
  "identifier" : "/documentation/DeviceActivity/DeviceActivityReport/init(_:filter:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Device Activity",
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:23_DeviceActivity_SwiftUI0aB6ReportV_6filterA2C7ContextV_0aB00aB6FilterVtcfc"
  },
  "title" : "init(_:filter:)"
}
-->

# init(_:filter:)

Creates a new device activity report.

```
@MainActor @preconcurrency init(_ context: DeviceActivityReport.Context, filter: DeviceActivityFilter = DeviceActivityFilter())
```

## Parameters

`context`

The context of the report.

`filter`

A filter for the device activity data that your app extension will use to render the report.

## Discussion

If you do not specify a filter, then the system will provide all device activity data for the current user and the current device to your
device activity report app extension.

---

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)