Accessing the Event Store

Request access to a user's calendar data through the event store.


Your app must obtain permission from the user before accessing the calendar database: an app must never directly modify the calendar database on its own. EKEventStore is the application’s point of contact for accessing calendar and reminder data.

Connect to the Event Store

To receive event data in iOS, you must request access to an entity type after initializing the event store with requestAccessToEntityType:completion:.

Connect to the event store with the following initializer:

EKEventStore *store = [[EKEventStore alloc] initWithAccessToEntityTypes:EKEntityMaskReminder];
var store = EKEventStore(accessToEntityTypes: .reminder)

Releasing an event store instance before other EventKit objects may result in an error.

Protect User Privacy with Info.plist Keys

An iOS app linked on or after iOS 10.0 must include in its Info.plist file the usage description keys for the types of data it needs to access. To access the user's calendar events, reminders, and contacts through EventKitUI, you need to include descriptions for:

The EventKitUI framework may need to access Contacts data to choose the correct display name or avatar for a contact in a calendar.

Because these keys provide access to the event store, they protect the user's privacy by only allowing access to this information if the user grants permission explicitly in the app.

To access the user’s Calendar data, all sandboxed macOS apps must include the key.

See Also

Calendar and Reminders

property list key NSCalendarsUsageDescription

A message that tells the user why the app is requesting access to the user’s calendar data.

Name: Privacy - Calendars Usage Description
property list key NSRemindersUsageDescription

A message that tells the user why the app is requesting access to the user’s reminders.

Name: Privacy - Reminders Usage Description