---
title: "event(withIdentifier:)"
framework: EventKit
role: symbol
role_heading: Instance Method
platforms: [iOS 4.0+, iPadOS 4.0+, Mac Catalyst 13.1+, macOS 10.8+, visionOS 1.0+, watchOS 2.0+]
path: eventkit/ekeventstore/1507490-event
---

# event(withIdentifier:)

Locates the first occurrence of an event with a given identifier.

## Declaration

```swift
func event(withIdentifier identifier: String) -> EKEvent?
```

## Parameters

- `identifier`: The identifier of the event.

## Return Value

The event that corresponds with `identifier`, or `nil` if no event is found.

## See Also

### Accessing calendar events

- [calendarItem(withIdentifier:)](calendaritem(withidentifier:).md)
- [calendarItems(withExternalIdentifier:)](calendaritems(withexternalidentifier:).md)
- [remove(_:span:)](remove(_:span:).md)
- [remove(_:span:commit:)](remove(_:span:commit:).md)
- [remove(_:commit:)](remove(_:commit:).md)
- [save(_:span:)](save(_:span:).md)
- [save(_:span:commit:)](save(_:span:commit:).md)
- [save(_:commit:)](save(_:commit:).md)
