CalStoreEventKitController Class Reference

Inherits from NSObject
Declared in CalStoreEventKitController.h

Overview

Singleton object that links the CalendarStore to the EventKit framework.

The CalendarStore uses EventKit to show if calendars are installed by the user and to send notifications about when an EKCalendar has been added due to an installation by the user.

Installation Notifications

If the CalendarStore framework detects that an EKCalendar has been installed because of an installation from the framework, it will broadcast a kCalStoreEKCalendarSubscriptionInstalledNotification notification. The notification’s userInfo[kCalStoreEKCalendarSubscriptionInstalledCalendarIdentifierKey] contains the calendarIdentifier of the EKCalendar that got installed. userInfo[kCalStoreEKCalendarSubscriptionInstalledItemKey] holds a reference to the CalStorePageItemCalendar that got installed, if available.

Calendar apps can observe this notification to ensure that the newly installed calendar will not be hidden, due to the user’s calendar visibility settings.

Disabling EventKit Integration

However, using EventKit is optional. To opt-out of using EventKit, call: [[CalStoreEventKitController sharedController]](#//api/name/sharedController).useEventKit = NO;

Changing EventStore

If you already have an EKEventStore object in use in your app, you can let the CalendarStore framework use that EventStore by assigning it to the eventStore property. If non is supplied, an EKEventStore object will be created on demand.

+ sharedController

Gives the singleton controller object

+ (instancetype)sharedController

Return Value

the singleton controller used by the framework

Declared In

CalStoreEventKitController.h

  eventStore

The EventStore used by the CalendarStore framework. If the framework needs an EKEventStore object while non is set, it will be created.

@property (nonatomic, strong) EKEventStore *eventStore

Discussion

Note: this property will be ignored if useEventKit is NO.

Declared In

CalStoreEventKitController.h

  useEventKit

Set to NO to disable any EventKit integration in the CalendarStore framework.

@property (nonatomic, assign) BOOL useEventKit

Discussion

Note: the CalStorePageItemCalendar.installed> property will no longer function, nor will any kCalStoreEKCalendarSubscriptionInstalledNotification be sent.

Declared In

CalStoreEventKitController.h