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

# nextInterval

The schedule’s next interval or the current interval if one is ongoing.

```
var nextInterval: DateInterval? { get }
```

## Discussion

`nil` if `intervalStart` and `intervalEnd` don’t match any future dates. The start and end dates indicate the earliest
point when the [`intervalDidStart(for:)`](/documentation/DeviceActivity/DeviceActivityMonitor/intervalDidStart(for:))
and [`intervalDidEnd(for:)`](/documentation/DeviceActivity/DeviceActivityMonitor/intervalDidEnd(for:)) methods of your app extension’s principal class
invokes. The system actually invokes these methods when someone uses the device during the interval.
The system additionally calls [`intervalDidEnd(for:)`](/documentation/DeviceActivity/DeviceActivityMonitor/intervalDidEnd(for:)) when you stop
monitoring an activity with an ongoing interval. The system doesn’t call these methods unless the device is used during the interval.

> Note: This interval is computed using the provided date components and the
> <doc://com.apple.documentation/documentation/Foundation/Calendar/MatchingPolicy/nextTimePreservingSmallerComponents>
> policy for the `calendar` of both date components. If you don’t specify a calendar for
> either components, the system uses `Calendar.current`.
> The system bases the interval’s end date on wall-clock time,
> regardless of any time zone changes that occur during the interval.

---

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)