Mac Developer Library

Developer

EventKit Framework Reference EKSource Class Reference

Options
Deployment Target:

On This Page
Language:

EKSource

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.

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

    Declaration

    Swift

    var sourceIdentifier: String { get }

    Objective-C

    @property(nonatomic, readonly) NSString *sourceIdentifier

    Availability

    Available in OS X v10.8 and later.

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

    Declaration

    Swift

    var sourceType: EKSourceType { get }

    Objective-C

    @property(nonatomic, readonly) EKSourceType sourceType

    Discussion

    Possible values are described in EKSourceType.

    Availability

    Available in OS X v10.8 and later.

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

    Declaration

    Swift

    var title: String { get }

    Objective-C

    @property(nonatomic, readonly) NSString *title

    Availability

    Available in OS X v10.8 and later.

Data Types

  • The type of source object.

    Declaration

    Swift

    enum EKSourceType : Int { case Local case Exchange case CalDAV case MobileMe case Subscribed case Birthdays }

    Objective-C

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

    Constants

    • Local

      EKSourceTypeLocal

      Represents a local source.

      Available in OS X v10.8 and later.

    • Exchange

      EKSourceTypeExchange

      Represents an Exchange source.

      Available in OS X v10.8 and later.

    • CalDAV

      EKSourceTypeCalDAV

      Represents a CalDAV or iCloud source.

      Available in OS X v10.8 and later.

    • MobileMe

      EKSourceTypeMobileMe

      Represents a MobileMe source.

      Available in OS X v10.8 and later.

    • Subscribed

      EKSourceTypeSubscribed

      Represents a subscribed source.

      Available in OS X v10.8 and later.

    • Birthdays

      EKSourceTypeBirthdays

      Represents a birthday source.

      Available in OS X v10.8 and later.

    Discussion

    Use these values to set the sourceType property.

    Import Statement

    Objective-C

    @import EventKit;

    Swift

    import EventKit

    Availability

    Available in OS X v10.8 and later.

  • The type of entities allowed for a source.

    Declaration

    Swift

    enum EKEntityType : UInt { case Event case Reminder }

    Objective-C

    typedef enum { EKEntityTypeEvent, EKEntityTypeReminder } EKEntityType;

    Constants

    • Event

      EKEntityTypeEvent

      Represents an event.

      Available in OS X v10.8 and later.

    • Reminder

      EKEntityTypeReminder

      Represents a reminder.

      Available in OS X v10.8 and later.

    Import Statement

    Objective-C

    @import EventKit;

    Swift

    import EventKit

    Availability

    Available in OS X v10.8 and later.

  • A bitmask of EKEntityType for specifying multiple entities at once.

    Declaration

    Swift

    struct EKEntityMask : OptionSetType { init(rawValue rawValue: UInt) static var Event: EKEntityMask { get } static var Reminder: EKEntityMask { get } }

    Objective-C

    typedef enum { EKEntityTypeEvent, EKEntityTypeReminder } EKEntityMask;

    Constants

    • Event

      EKEntityMaskEvent

      Represents an event.

      Available in OS X v10.8 and later.

    • Reminder

      EKEntityMaskReminder

      Represents a reminder.

      Available in OS X v10.8 and later.

    Import Statement

    Objective-C

    @import EventKit;

    Swift

    import EventKit

    Availability

    Available in OS X v10.8 and later.