May 2011
Beginner
834 pages
25h 19m
English
The user’s calendar information, which the user sees through the Calendar app, is effectively a database. Starting in iOS 4.0, this database can be accessed directly through the Event Kit framework. You’ll link to EventKit.framework and import <EventKit/EventKit.h>.
A user interface for interacting with the calendar is also provided, by the Event Kit UI framework. This interface basically replicates part of the Calendar app. You’ll link to EventKitUI.framework and import <EventKitUI/EventKitUI.h>.
The calendar database is accessed as an instance of the EKEventStore class. Starting with this instance, you can obtain two kinds of object:
calendars property, or the default calendar with the defaultCalendarForNewEvents property. Calendars have various types (type), reflecting the nature of their origin: a calendar can be created and maintained by the user locally (EKCalendarTypeLocal), but it might also live remotely on the network (EKCalendarTypeCalDAV, EKCalendarTypeExchange), possibly being updated by subscription (EKCalendarTypeSubscription); the Birthday calendar (EKCalendarTypeBirthday) is generated automatically from information in the address book. You can’t create a calendar.
Read now
Unlock full access