---
title: nextInterval
framework: Device Activity
role: symbol
role_heading: Instance Property
platforms: [iOS 15.0+, iPadOS 15.0+, Mac Catalyst 15.0+]
path: deviceactivity/deviceactivityschedule/nextinterval
---

# nextInterval

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

## Declaration

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

## Discussion

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:) and 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:) 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 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.

## See Also

### Creating a Schedule

- [init(intervalStart:intervalEnd:repeats:warningTime:)](deviceactivity/deviceactivityschedule/init(intervalstart:intervalend:repeats:warningtime:).md)
- [intervalEnd](deviceactivity/deviceactivityschedule/intervalend.md)
- [intervalStart](deviceactivity/deviceactivityschedule/intervalstart.md)
- [repeats](deviceactivity/deviceactivityschedule/repeats.md)
- [warningTime](deviceactivity/deviceactivityschedule/warningtime.md)
