---
title: "init(occurrenceCount:)"
framework: eventkit
role: symbol
role_heading: Initializer
path: "eventkit/ekrecurrenceend/init(occurrencecount:)"
---

# init(occurrenceCount:)

Initializes and returns a count-based recurrence end with a given maximum occurrence count.

## Declaration

```swift
convenience init(occurrenceCount: Int)
```

## Parameters

- `occurrenceCount`: The maximum occurrence count.

## Return Value

Return Value The initialized recurrence end.

## Discussion

Discussion The maximum occurrence count argument must be a positive integer and not 0; otherwise an exception will be raised.

## See Also

### Creating a Recurrence End

- [init(end:)](eventkit/ekrecurrenceend/init(end:).md)
