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.

Inheritance


Conforms To


Import Statement


import EventKit @import EventKit;

Availability


Available in OS X v10.8 and later.
  • A unique identifier for the source object. (read-only)

    Declaration

    Swift

    var sourceIdentifier: String! { get }

    Objective-C

    @property(nonatomic, readonly) NSString *sourceIdentifier

    Import Statement

    import EventKit

    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.

    Import Statement

    import EventKit

    Availability

    Available in OS X v10.8 and later.

  • title title Property

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

    Declaration

    Swift

    var title: String! { get }

    Objective-C

    @property(nonatomic, readonly) NSString *title

    Import Statement

    import EventKit

    Availability

    Available in OS X v10.8 and later.

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

    Declaration

    Swift

    func calendarsForEntityType(_ entityType: EKEntityType) -> NSSet!

    Objective-C

    - (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.

    Import Statement

    import EventKit

    Availability

    Available in OS X v10.8 and later.

    See Also

    EKEntityType

Data Types

  • The type of source object.

    Declaration

    Swift

    struct EKSourceType { init(_ value: UInt32) var value: UInt32 }

    Objective-C

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

    Constants

    • EKSourceTypeLocal

      EKSourceTypeLocal

      Represents a local source.

      Available in OS X v10.8 and later.

    • EKSourceTypeExchange

      EKSourceTypeExchange

      Represents an Exchange source.

      Available in OS X v10.8 and later.

    • EKSourceTypeCalDAV

      EKSourceTypeCalDAV

      Represents a CalDAV or iCloud source.

      Available in OS X v10.8 and later.

    • EKSourceTypeMobileMe

      EKSourceTypeMobileMe

      Represents a MobileMe source.

      Available in OS X v10.8 and later.

    • EKSourceTypeSubscribed

      EKSourceTypeSubscribed

      Represents a subscribed source.

      Available in OS X v10.8 and later.

    • EKSourceTypeBirthdays

      EKSourceTypeBirthdays

      Represents a birthday source.

      Available in OS X v10.8 and later.

    Discussion

    Use these values to set the sourceType property.

    Import Statement

    import EventKit

    Availability

    Available in OS X v10.8 and later.

  • The type of entities allowed for a source.

    Declaration

    Swift

    typealias EKEntityType = Int

    Objective-C

    typedef enum { EKEntityTypeEvent, EKEntityTypeReminder } EKEntityType;

    Constants

    • EKEntityTypeEvent

      EKEntityTypeEvent

      Represents an event.

      Available in OS X v10.8 and later.

    • EKEntityTypeReminder

      EKEntityTypeReminder

      Represents a reminder.

      Available in OS X v10.8 and later.

    Import Statement

    import EventKit

    Availability

    Available in OS X v10.8 and later.

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

    Declaration

    Swift

    typealias EKEntityMask = Int

    Objective-C

    typedef enum { EKEntityTypeEvent, EKEntityTypeReminder } EKEntityMask;

    Constants

    • EKEntityMaskEvent

      EKEntityMaskEvent

      Represents an event.

      Available in OS X v10.8 and later.

    • EKEntityMaskReminder

      EKEntityMaskReminder

      Represents a reminder.

      Available in OS X v10.8 and later.

    Import Statement

    import EventKit

    Availability

    Available in OS X v10.8 and later.