---
title: "init(recurrenceWith:interval:end:)"
framework: eventkit
role: symbol
role_heading: Initializer
path: "eventkit/ekrecurrencerule/init(recurrencewith:interval:end:)"
---

# init(recurrenceWith:interval:end:)

Initializes and returns a simple recurrence rule with a given frequency, interval, and end.

## Declaration

```swift
init(recurrenceWith type: EKRecurrenceFrequency, interval: Int, end: EKRecurrenceEnd?)
```

## Parameters

- `type`: The frequency of the recurrence rule. Can be daily, weekly, monthly, or yearly.
- `interval`: The interval between instances of this recurrence. For example, a weekly recurrence rule with an interval of 2 occurs every other week. Must be greater than 0.
- `end`: The end of the recurrence rule.

## Mentioned in

Creating a recurring event

## Return Value

Return Value The initialized recurrence rule, or nil if invalid values are provided.

## See Also

### Related Documentation

- [Calendar and Reminders Programming Guide](apple-archive/documentation/DataManagement/Conceptual/EventKitProgGuide/Introduction.md)

### Creating a Basic Recurrence Rule

- [EKSpan](eventkit/ekspan.md)
