---
title: "intervalDidEnd(for:)"
framework: Device Activity
role: symbol
role_heading: Instance Method
platforms: [iOS 15.0+, iPadOS 15.0+, Mac Catalyst 15.0+]
path: "deviceactivity/deviceactivitymonitor/intervaldidend(for:)"
---

# intervalDidEnd(for:)

Indicates that the device activity interval ended.

## Declaration

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

## Parameters

- `activity`: The name of the activity.

## Discussion

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.

## See Also

### Monitoring Scheduled Intervals

- [intervalDidStart(for:)](deviceactivity/deviceactivitymonitor/intervaldidstart(for:).md)
- [intervalWillEndWarning(for:)](deviceactivity/deviceactivitymonitor/intervalwillendwarning(for:).md)
- [intervalWillStartWarning(for:)](deviceactivity/deviceactivitymonitor/intervalwillstartwarning(for:).md)
