EKSource Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/EventKit.framework
Availability
Available in iOS 5.0 and later.
Declared in
EKSource.h
EKTypes.h

Overview

An instance of the EKSource class represents the account that a calendar belongs to. You do not create instances of this class. You retrieve EKSource objects from an EKEventStore object. Use the sources property to get all the EKSource objects for an event store, and use the methods in this class to access properties of the source object.

Tasks

Accessing Source Properties

Accessing Calendars

Properties

sourceIdentifier

A unique identifier for the source object. (read-only)

@property(nonatomic, readonly) NSString *sourceIdentifier
Availability
  • Available in iOS 5.0 and later.
Declared In
EKSource.h

sourceType

The type of this source object. (read-only)

@property(nonatomic, readonly) EKSourceType sourceType
Discussion

Possible values are described in EKSourceType.

Availability
  • Available in iOS 5.0 and later.
Declared In
EKSource.h

title

The name of this source object. (read-only)

@property(nonatomic, readonly) NSString *title
Availability
  • Available in iOS 5.0 and later.
Declared In
EKSource.h

Instance Methods

calendarsForEntityType:

Returns the calendars that belong to this source object that support a particular entity type.

- (NSSet *)calendarsForEntityType:(EKEntityType)entityType
Parameters
entityType

The entity type of either an event or a reminder.

Return Value

The calendars belonging to this source that support the entity type.

Availability
  • Available in iOS 6.0 and later.
See Also
Declared In
EKSource.h

Constants

EKSourceType

The type of source object.

typedef enum {
   EKSourceTypeLocal,
   EKSourceTypeExchange,
   EKSourceTypeCalDAV,
   EKSourceTypeMobileMe,
   EKSourceTypeSubscribed,
   EKSourceTypeBirthdays
} EKSourceType;
Constants
EKSourceTypeLocal

Represents a local source.

Available in iOS 5.0 and later.

Declared in EKTypes.h.

EKSourceTypeExchange

Represents an Exchange source.

Available in iOS 5.0 and later.

Declared in EKTypes.h.

EKSourceTypeCalDAV

Represents a CalDAV or iCloud source.

Available in iOS 5.0 and later.

Declared in EKTypes.h.

EKSourceTypeMobileMe

Represents a MobileMe source.

Available in iOS 5.0 and later.

Declared in EKTypes.h.

EKSourceTypeSubscribed

Represents a subscribed source.

Available in iOS 5.0 and later.

Declared in EKTypes.h.

EKSourceTypeBirthdays

Represents a birthday source.

Available in iOS 5.0 and later.

Declared in EKTypes.h.

Discussion

Use these values to set the sourceType property.

Availability
  • Available in iOS 5.0 and later.
Declared In
EKTypes.h

EKEntityType

The type of entities allowed for a source.

typedef enum {
   EKEntityTypeEvent,
   EKEntityTypeReminder
} EKEntityType;
Constants
EKEntityTypeEvent

Represents an event.

Available in iOS 6.0 and later.

Declared in EKTypes.h.

EKEntityTypeReminder

Represents a reminder.

Available in iOS 6.0 and later.

Declared in EKTypes.h.

Availability
  • Available in iOS 6.0 and later.
Declared In
EKTypes.h

EKEntityMask

A bitmask of EKEntityType for specifying multiple entities at once.

typedef enum {
   EKEntityTypeEvent,
   EKEntityTypeReminder
} EKEntityMask;
Constants
EKEntityMaskEvent

Represents an event.

Available in iOS 6.0 and later.

Declared in EKTypes.h.

EKEntityMaskReminder

Represents a reminder.

Available in iOS 6.0 and later.

Declared in EKTypes.h.

Availability
  • Available in iOS 6.0 and later.
Declared In
EKTypes.h