<!--
{
  "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",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "EventKit"
    ],
    "preciseIdentifier" : "c:objc(cs)EKEventStore"
  },
  "title" : "EKEventStore"
}
-->

# EKEventStore

An object that accesses a person’s calendar events and reminders and supports the scheduling of new events.

```
class EKEventStore
```

## Overview

The `EKEventStore` class is an app’s point of contact for accessing calendar and reminder data.

After initializing the event store, you must request access to events or reminders before attempting to fetch or create data. To request access to reminders, call [`requestFullAccessToReminders(completion:)`](/documentation/EventKit/EKEventStore/requestFullAccessToReminders(completion:)). To request access to events, call [`requestWriteOnlyAccessToEvents(completion:)`](/documentation/EventKit/EKEventStore/requestWriteOnlyAccessToEvents(completion:)) or [`requestFullAccessToEvents(completion:)`](/documentation/EventKit/EKEventStore/requestFullAccessToEvents(completion:)).

> Important:
> To request access to events and reminders, your app needs to include permission strings in its `Info.plist` file that explain to someone why the app needs access. For more information, see <doc://com.apple.eventkit/documentation/EventKit/accessing-the-event-store>.

A typical workflow for using an event store is:

1. Create a predicate, or a search query for events, with [`predicateForEvents(withStart:end:calendars:)`](/documentation/EventKit/EKEventStore/predicateForEvents(withStart:end:calendars:)).
2. Fetch and process events that match the predicate with the [`events(matching:)`](/documentation/EventKit/EKEventStore/events(matching:)) and [`enumerateEvents(matching:using:)`](/documentation/EventKit/EKEventStore/enumerateEvents(matching:using:)) methods.
3. Save and delete events from the event store with the [`save(_:span:commit:)`](/documentation/EventKit/EKEventStore/save(_:span:commit:)) and [`remove(_:span:commit:)`](/documentation/EventKit/EKEventStore/remove(_:span:commit:)) methods.

Use similar methods to access and manipulate reminders.

After receiving an object from an event store, don’t use that object with a different event store. This restriction applies to [`EKObject`](/documentation/EventKit/EKObject) subclasses such as [`EKEvent`](/documentation/EventKit/EKEvent), [`EKReminder`](/documentation/EventKit/EKReminder), [`EKCalendar`](/documentation/EventKit/EKCalendar), and [`EKSource`](/documentation/EventKit/EKSource), as well as predicates that the event store creates. For example, don’t fetch an event from one event store, modify the event, and then pass it to [`save(_:span:)`](/documentation/EventKit/EKEventStore/save(_:span:)) in a different store.

## Topics

### Creating event stores

[`init()`](/documentation/EventKit/EKEventStore/init())

Creates a new event store.

[`init(sources: [EKSource])`](/documentation/EventKit/EKEventStore/init(sources:))

Creates an event store that contains data for the specified sources.

[`var eventStoreIdentifier: String`](/documentation/EventKit/EKEventStore/eventStoreIdentifier)

The unique identifier for the event store.

[`- (id) initWithAccessToEntityTypes:(EKEntityMask) entityTypes;`](/documentation/EventKit/EKEventStore/initWithAccessToEntityTypes:)

Initializes access to the event store with support for the given entity type.

### Requesting access to events and reminders

[`func requestWriteOnlyAccessToEvents(completion: (Bool, (any Error)?) -> Void)`](/documentation/EventKit/EKEventStore/requestWriteOnlyAccessToEvents(completion:))

Prompts the person using your app to grant or deny write access to event data.

[`func requestFullAccessToEvents(completion: (Bool, (any Error)?) -> Void)`](/documentation/EventKit/EKEventStore/requestFullAccessToEvents(completion:))

Prompts people to grant or deny read and write access to event data.

[`func requestFullAccessToReminders(completion: (Bool, (any Error)?) -> Void)`](/documentation/EventKit/EKEventStore/requestFullAccessToReminders(completion:))

Prompts people to grant or deny read and write access to reminders.

[`class func authorizationStatus(for: EKEntityType) -> EKAuthorizationStatus`](/documentation/EventKit/EKEventStore/authorizationStatus(for:))

Determines the authorization status for the given entity type.

[`enum EKAuthorizationStatus`](/documentation/EventKit/EKAuthorizationStatus)

The current authorization status for a specific entity type.

[`typealias EKEventStoreRequestAccessCompletionHandler`](/documentation/EventKit/EKEventStoreRequestAccessCompletionHandler)

The signature for a closure that EventKit calls when requesting access to event and reminder data.

  <doc://com.apple.documentation/documentation/BundleResources/Information-Property-List/NSCalendarsFullAccessUsageDescription>

  <doc://com.apple.documentation/documentation/BundleResources/Information-Property-List/NSCalendarsWriteOnlyAccessUsageDescription>

  <doc://com.apple.documentation/documentation/BundleResources/Information-Property-List/NSRemindersFullAccessUsageDescription>

### Accessing account sources

[`var sources: [EKSource]`](/documentation/EventKit/EKEventStore/sources)

An unordered array of objects that represent accounts that contain calendars.

[`var delegateSources: [EKSource]`](/documentation/EventKit/EKEventStore/delegateSources)

The event sources delegated to the person using your app.

[`func source(withIdentifier: String) -> EKSource?`](/documentation/EventKit/EKEventStore/source(withIdentifier:))

Locates an event source with the specified identifier.

### Saving and restoring state

[`func commit() throws`](/documentation/EventKit/EKEventStore/commit())

Commits all unsaved changes to the event store.

[`func reset()`](/documentation/EventKit/EKEventStore/reset())

Reverts the event store to its saved state.

[`func refreshSourcesIfNecessary()`](/documentation/EventKit/EKEventStore/refreshSourcesIfNecessary())

Pulls new data from remote sources, if necessary.

### Accessing calendars

[`var defaultCalendarForNewEvents: EKCalendar?`](/documentation/EventKit/EKEventStore/defaultCalendarForNewEvents)

The calendar that events are added to by default, as specified by user settings.

[`func defaultCalendarForNewReminders() -> EKCalendar?`](/documentation/EventKit/EKEventStore/defaultCalendarForNewReminders())

Identifies the default calendar for adding reminders to, as specified by user settings.

[`func calendars(for: EKEntityType) -> [EKCalendar]`](/documentation/EventKit/EKEventStore/calendars(for:))

Identifies the calendars that support a given entity type, such as reminders or events.

[`func calendar(withIdentifier: String) -> EKCalendar?`](/documentation/EventKit/EKEventStore/calendar(withIdentifier:))

Locates a calendar with the specified identifier.

[`func saveCalendar(EKCalendar, commit: Bool) throws`](/documentation/EventKit/EKEventStore/saveCalendar(_:commit:))

Saves a calendar to the event store by either committing or batching the changes.

[`func removeCalendar(EKCalendar, commit: Bool) throws`](/documentation/EventKit/EKEventStore/removeCalendar(_:commit:))

Removes a calendar from the event store by either committing or batching the changes.

[`var calendars: [EKCalendar]`](/documentation/EventKit/EKEventStore/calendars)

The calendars associated with the event store.

### Accessing calendar events

[`func event(withIdentifier: String) -> EKEvent?`](/documentation/EventKit/EKEventStore/event(withIdentifier:))

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

[`func calendarItem(withIdentifier: String) -> EKCalendarItem?`](/documentation/EventKit/EKEventStore/calendarItem(withIdentifier:))

Locates a reminder or the first occurrence of an event with the specified identifier.

[`func calendarItems(withExternalIdentifier: String) -> [EKCalendarItem]`](/documentation/EventKit/EKEventStore/calendarItems(withExternalIdentifier:))

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

[`func remove(EKEvent, span: EKSpan) throws`](/documentation/EventKit/EKEventStore/remove(_:span:))

Removes an event from the event store.

[`func remove(EKEvent, span: EKSpan, commit: Bool) throws`](/documentation/EventKit/EKEventStore/remove(_:span:commit:))

Removes an event or recurring events from the event store by either committing or batching the changes.

[`func remove(EKReminder, commit: Bool) throws`](/documentation/EventKit/EKEventStore/remove(_:commit:))

Removes a reminder from the event store by either committing or batching the changes.

[`func save(EKEvent, span: EKSpan) throws`](/documentation/EventKit/EKEventStore/save(_:span:))

Saves changes to an event permanently.

[`func save(EKEvent, span: EKSpan, commit: Bool) throws`](/documentation/EventKit/EKEventStore/save(_:span:commit:))

Saves an event or recurring events to the event store by either committing or batching the changes.

[`func save(EKReminder, commit: Bool) throws`](/documentation/EventKit/EKEventStore/save(_:commit:))

Saves changes to a reminder by either committing or batching the changes.

### Searching calendars

[`func enumerateEvents(matching: NSPredicate, using: EKEventSearchCallback)`](/documentation/EventKit/EKEventStore/enumerateEvents(matching:using:))

Finds all events that match a given predicate and calls a given callback for each event found.

[`func events(matching: NSPredicate) -> [EKEvent]`](/documentation/EventKit/EKEventStore/events(matching:))

Finds all events that match a given predicate.

[`func fetchReminders(matching: NSPredicate, completion: ([EKReminder]?) -> Void) -> Any`](/documentation/EventKit/EKEventStore/fetchReminders(matching:completion:))

Fetches reminders that match a given predicate.

[`func cancelFetchRequest(Any)`](/documentation/EventKit/EKEventStore/cancelFetchRequest(_:))

Cancels the request to fetch reminders.

[`func predicateForEvents(withStart: Date, end: Date, calendars: [EKCalendar]?) -> NSPredicate`](/documentation/EventKit/EKEventStore/predicateForEvents(withStart:end:calendars:))

Creates a predicate to identify events that occur within a given date range.

[`func predicateForReminders(in: [EKCalendar]?) -> NSPredicate`](/documentation/EventKit/EKEventStore/predicateForReminders(in:))

Creates a predicate to identify all reminders in a collection of calendars.

[`func predicateForCompletedReminders(withCompletionDateStarting: Date?, ending: Date?, calendars: [EKCalendar]?) -> NSPredicate`](/documentation/EventKit/EKEventStore/predicateForCompletedReminders(withCompletionDateStarting:ending:calendars:))

Creates a predicate to identify all completed reminders that occur within a given date range.

[`func predicateForIncompleteReminders(withDueDateStarting: Date?, ending: Date?, calendars: [EKCalendar]?) -> NSPredicate`](/documentation/EventKit/EKEventStore/predicateForIncompleteReminders(withDueDateStarting:ending:calendars:))

Creates a predicate to identify all incomplete reminders that occur within a given date range.

[`typealias EKEventSearchCallback`](/documentation/EventKit/EKEventSearchCallback)

The signature for a closure that operates on events when enumerating them.

### Deprecated methods

[`func requestAccess(to: EKEntityType, completion: (Bool, (any Error)?) -> Void)`](/documentation/EventKit/EKEventStore/requestAccess(to:completion:))

Prompts the person using your app to grant or deny access to event or reminder data.

### Structures

[`struct EventStoreChanged`](/documentation/EventKit/EKEventStore/EventStoreChanged)

A notification posted when changes are made to the Calendar or Reminders database.

## Relationships

### Conforms To

[`Equatable`](/documentation/Swift/Equatable)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`Hashable`](/documentation/Swift/Hashable)

[`CVarArg`](/documentation/Swift/CVarArg)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)