Framework

EventKit

Create, view, and edit calendar and reminder events.

Overview

The EventKit framework provides access to calendar and reminders data so you and your users can create, retrieve, and edit calendar items in your app. In iOS, EventKitUI provides user interfaces you can implement in your app to let users create and edit calendar items.

You can use EventKit to set up alarms and create recurring events. And if a change to the Calendar database occurs from outside your app, EventKit detects the change and sends a notification, allowing you to stay up to date.

Figure 1

EventKit architecture

Diagram of the EventKit architecture depicting an Application Sandbox containing the Client Application and the EventKit Framework, with arrows leading to and from the "calaccessd", and then to and from the Protected Filesystem Area, also labeled the "Calendar Database." Arrows lead from the Protected Filesystem area to and from the Calendar app icon and the Reminder app icon.

Topics

First Steps

Accessing the Event Store

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

class EKEventStore

An object that accesses the user’s calendar and reminder events and supports the scheduling of new events.

Events and Reminders

Creating Events and Reminders

Create and modify events and reminders in a user's database.

Retrieving Events and Reminders

Fetch events and reminders from the Calendar database.

Updating with Notifications

Register to be notified about changes and keep your app up to date.

class EKEvent

A class that represents an event added to a calendar.

class EKReminder

A class that represents a reminder added to a calendar.

Calendars

class EKCalendar

A class that represents a calendar in Event Kit.

class EKParticipant

A class that represents a participant in a calendar event.

Recurrence

Creating a Recurring Event

Set up an event or reminder that repeats.

class EKRecurrenceDayOfWeek

A class that represents the day of the week.

class EKRecurrenceEnd

A class that defines the end of a recurrence rule.

class EKRecurrenceRule

A class that describes the recurrence pattern for a recurring event.

Alarms

Setting an Alarm

Alert users of events and reminders with an alarm.

class EKAlarm

An class that represents an alarm.

class EKStructuredLocation

A class that specifies a geofence used to trigger the alarm of a calendar item.

Common Objects

class EKSource

An abstract superclass that represents the account a calendar belongs to.

class EKObject

An abstract superclass for all Event Kit classes that have instances that are persistent.

class EKCalendarItem

An abstract superclass for calendar events and reminders.

Errors

struct EKError

An error returned from EventKit.

enum EKError.Code

Values that are returned as the error code property of an NSError object.

let EKErrorDomain: String

String that identifies the EventKit error domain.

See Also