<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "DeviceActivity",
  "identifier" : "/documentation/DeviceActivity/DeviceActivityMonitor/eventWillReachThresholdWarning(_:activity:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Device Activity"
    ],
    "preciseIdentifier" : "s:14DeviceActivity0aB7MonitorC30eventWillReachThresholdWarning_8activityyAA0aB5EventV4NameV_AA0abK0VtF"
  },
  "title" : "eventWillReachThresholdWarning(_:activity:)"
}
-->

# eventWillReachThresholdWarning(_:activity:)

Warns your app that an activity is about to reach its threshold.

```
func eventWillReachThresholdWarning(_ event: DeviceActivityEvent.Name, activity: DeviceActivityName)
```

## Parameters

`event`

The name of the event.

`activity`

The name of the activity.

## Discussion

When an activity is about to reach its threshold, `eventWillReachThresholdWarning` warns your app extension of the concluding threshold limit.

---

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)