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

# intervalDidEnd(for:)

Indicates that the device activity interval ended.

```
func intervalDidEnd(for activity: DeviceActivityName)
```

## Parameters

`activity`

The name of the activity.

## Discussion

An activity ends when someone first uses the device outside the activity’s scheduled time interval
or when your app stops monitoring an activity with an ongoing interval.
In other words,
the system only invokes this method when the device is in use.

---

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)