---
title: "calendarItems(withExternalIdentifier:)"
framework: EventKit
role: symbol
role_heading: Instance Method
platforms: [iOS 6.0+, iPadOS 6.0+, Mac Catalyst 13.1+, macOS 10.8+, visionOS 1.0+, watchOS 2.0+]
path: eventkit/ekeventstore/1507281-calendaritemswithexternalidentif
---

# calendarItems(withExternalIdentifier:)

Locates all reminders or the first occurrences of all events with the specified external identifier.

## Declaration

```swift
func calendarItems(withExternalIdentifier externalIdentifier: String) -> [EKCalendarItem]
```

## Parameters

- `externalIdentifier`: The calendar item’s external identifier.

## Return Value

An array of calendar items with the specified identifier.

## Discussion

Use [calendarItemExternalIdentifier](../ekcalendaritem/calendaritemexternalidentifier.md) to obtain the external identifier. There may be more than one matching calendar item due to reasons discussed in `calendarItemExternalIdentifier`.

## See Also

### Accessing calendar events

- [event(withIdentifier:)](event(withidentifier:).md)
- [calendarItem(withIdentifier:)](calendaritem(withidentifier:).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)
