<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.8.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "EventKit",
  "identifier" : "/documentation/EventKit/EKEventStore/events(matching:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "EventKit"
    ],
    "preciseIdentifier" : "c:objc(cs)EKEventStore(im)eventsMatchingPredicate:"
  },
  "title" : "events(matching:)"
}
-->

# events(matching:)

Finds all events that match a given predicate.

```
func events(matching predicate: NSPredicate) -> [EKEvent]
```

## Parameters

`predicate`

A search predicate created with [`predicateForEvents(withStart:end:calendars:)`](/documentation/EventKit/EKEventStore/predicateForEvents(withStart:end:calendars:)).

## Return Value

An array of events that match `predicate`.

## Discussion

Only committed events are included in the results. To include events saved using [`save(_:span:commit:)`](/documentation/EventKit/EKEventStore/save(_:span:commit:)) with the `commit` parameter set to <doc://com.apple.documentation/documentation/Swift/false>, call [`commit()`](/documentation/EventKit/EKEventStore/commit()) first.

This method is synchronous. For asynchronous behavior, run the method on another thread with <doc://com.apple.documentation/documentation/Dispatch/dispatch_async> or <doc://com.apple.documentation/documentation/Foundation/Operation>.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)