Platforms to show: All Mac Windows Linux Cross-Platform
EKEventStoreMBS class
Super class: EKObjectMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Calendar | MBS Mac64bit Plugin | 15.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
It is an application’s point of contact for accessing calendar and reminder data.
You must request access to an entity type after the event store is initialized with requestAccessToEntityType for data to return.
Acceptable entity types are EKEntityMaskEvent for events and EKEntityMaskReminder for reminders.
Create a predicate, or a search query for events, with the predicateForEventsWithStartDate method.
Fetch and process events that match a given predicate with the eventsMatchingPredicate: and enumerateEventsMatchingPredicate methods.
Save and delete events from the event store with the saveEvent and removeEvent methods.
Subclass of the EKObjectMBS class.
- 5 events
- event Changed
- event enumerateEventsMatchingPredicateUpdate(e as EKEventMBS, byref stop as boolean, predicate as NSPredicateMBS, tag as Variant)
- event eventsMatchingPredicateAsyncCompleted(events() as EKEventMBS, predicate as NSPredicateMBS, tag as Variant)
- event fetchRemindersMatchingPredicateCompleted(reminders() as EKReminderMBS, predicate as NSPredicateMBS, tag as Variant)
- event requestAccessToEntityTypeCompleted(entityType as Integer, granted as Boolean, error as NSErrorMBS, tag as Variant)
- 3 properties
- property defaultCalendarForNewEvents as EKCalendarMBS
- property defaultCalendarForNewReminders as EKCalendarMBS
- property eventStoreIdentifier as String
- 50 methods
- method calendarItemsWithExternalIdentifier(identifier as string) as EKCalendarItemMBS()
- method calendarItemWithIdentifier(identifier as string) as EKCalendarItemMBS
- method calendarsForEntityType(types as Integer) as EKCalendarMBS()
- method calendarWithIdentifier(identifier as string) as EKCalendarMBS
- method cancelFetchRequest(request as EKFetchRequestMBS)
- method commit(byref error as NSErrorMBS)
- method Constructor
- method Constructor(sources() as EKSourceMBS)
- method Constructor(types as Integer)
- method Destructor
- method enumerateEventsMatchingPredicate(predicate as NSPredicateMBS, tag as Variant = nil)
- method eventsMatchingPredicate(predicate as NSPredicateMBS) as EKEventMBS()
- method eventsMatchingPredicateAsync(predicate as NSPredicateMBS, tag as Variant = nil)
- method eventsWithExternalIdentifier(identifier as string) as EKCalendarItemMBS()
- method eventWithIdentifier(identifier as string) as EKEventMBS
- method fetchRemindersMatchingPredicate(predicate as NSPredicateMBS, tag as Variant = nil) as EKFetchRequestMBS
- method fetchRemindersMatchingPredicateSync(predicate as NSPredicateMBS) as EKReminderMBS()
- method predicateForCompletedRemindersWithCompletionDate(startDate as date, endDate as date) as NSPredicateMBS
- method predicateForCompletedRemindersWithCompletionDate(startDate as date, endDate as date, calendars() as EKCalendarMBS) as NSPredicateMBS
- method predicateForCompletedRemindersWithCompletionDate(startDate as dateTime, endDate as dateTime) as NSPredicateMBS
- method predicateForCompletedRemindersWithCompletionDate(startDate as dateTime, endDate as dateTime, calendars() as EKCalendarMBS) as NSPredicateMBS
- method predicateForEvents(startDate as date, endDate as date) as NSPredicateMBS
- method predicateForEvents(startDate as date, endDate as date, calendars() as EKCalendarMBS) as NSPredicateMBS
- method predicateForEvents(startDate as dateTime, endDate as dateTime) as NSPredicateMBS
- method predicateForEvents(startDate as dateTime, endDate as dateTime, calendars() as EKCalendarMBS) as NSPredicateMBS
- method predicateForIncompleteRemindersWithDueDate(startDate as date, endDate as date) as NSPredicateMBS
- method predicateForIncompleteRemindersWithDueDate(startDate as date, endDate as date, calendars() as EKCalendarMBS) as NSPredicateMBS
- method predicateForIncompleteRemindersWithDueDate(startDate as dateTime, endDate as dateTime) as NSPredicateMBS
- method predicateForIncompleteRemindersWithDueDate(startDate as dateTime, endDate as dateTime, calendars() as EKCalendarMBS) as NSPredicateMBS
- method predicateForRemindersInCalendar(calendar as EKCalendarMBS) as NSPredicateMBS
- method predicateForRemindersInCalendars(calendars() as EKCalendarMBS) as NSPredicateMBS
- method refreshSourcesIfNecessary
- method remindersWithExternalIdentifier(identifier as string) as EKCalendarItemMBS()
- method reminderWithIdentifier(identifier as string) as EKCalendarItemMBS
- method removeCalendar(calendar as EKCalendarMBS, commit as boolean, byref error as NSErrorMBS) as boolean
- method removeEvent(event as EKEventMBS, span as integer, byref error as NSErrorMBS) as boolean
- method removeEvent(event as EKEventMBS, span as Integer, commit as boolean, byref error as NSErrorMBS) as boolean
- method removeReminder(reminder as EKReminderMBS, commit as boolean, byref error as NSErrorMBS) as boolean
- method requestAccessToEntityType(entityType as Integer, tag as Variant = nil)
- method requestFullAccessToEvents(tag as variant = nil) New in 24.1
- method requestFullAccessToReminders(tag as variant = nil) New in 24.1
- method requestWriteOnlyAccessToEvents(tag as variant = nil) New in 24.1
- method reset
- method saveCalendar(calendar as EKCalendarMBS, commit as boolean, byref error as NSErrorMBS) as boolean
- method saveEvent(event as EKEventMBS, span as integer, byref error as NSErrorMBS) as boolean
- method saveEvent(event as EKEventMBS, span as Integer, commit as boolean, byref error as NSErrorMBS) as boolean
- method saveReminder(reminder as EKReminderMBS, commit as boolean, byref error as NSErrorMBS) as boolean
- method sources as EKSourceMBS()
- method sourceWithIdentifier(identifier as string) as EKSourceMBS
- 4 shared methods
- shared method authorizationStatusForEntityType(entityType as Integer) as Integer
- shared method Available as boolean
- shared method EKErrorDomain as string
- shared method EKEventStoreChangedNotification as string
- 43 constants
Authorization Status
Constant | Value | Description |
---|---|---|
kAuthorizationStatusAuthorized | 3 |
The app is authorized to access the service. |
kAuthorizationStatusDenied | 2 |
The user explicitly denied access to the service for the app. |
kAuthorizationStatusNotDetermined | 0 |
The user has not yet made a choice regarding whether the app may access the service. |
kAuthorizationStatusRestricted | 1 |
The app is not authorized to access the service. The user cannot change this app’s authorization status, possibly due to active restrictions such as parental controls being in place. |
Entity Mask
Constant | Value | Description |
---|---|---|
kEntityMaskEvent | 1 |
Event |
kEntityMaskReminder | 2 |
Reminder |
Types
Constant | Value | Description |
---|---|---|
kEntityTypeEvent | 0 |
Entity Event |
kEntityTypeReminder | 1 |
Entity Reminder |
Errors
Constant | Value | Description |
---|---|---|
kErrorAlarmGreaterThanRecurrence | 8 |
The alarm interval is greater than the recurrence interval. |
kErrorAlarmProximityNotSupported | 21 |
The source does not allow geofences on alarms. |
kErrorCalendarDoesNotAllowEvents | 22 |
The calendar does not allow events to be added. |
kErrorCalendarDoesNotAllowReminders | 23 |
The calendar does not allow reminders to be added. |
kErrorCalendarHasNoSource | 14 |
The calendar cannot be saved with no source set. |
kErrorCalendarIsImmutable | 16 |
The calendar is immutable and cannot be modified or deleted. |
kErrorCalendarReadOnly | 6 |
The calendar is read-only and cannot have events added to it. |
kErrorCalendarSourceCannotBeModified | 15 |
The calendar cannot be moved to another source. |
kErrorDatesInverted | 4 |
The event’s end date occurs before its start date. |
kErrorDurationGreaterThanRecurrence | 7 |
The duration of an event is greater than its recurrence interval. |
kErrorEventNotMutable | 0 |
The event is not mutable and cannot be saved or deleted. |
kErrorInternalFailure | 5 |
An internal error occurred. |
kErrorInvalidSpan | 13 |
An invalid span was passed when saving or deleting. |
kErrorInvitesCannotBeMoved | 12 |
The event cannot be moved because it is an invite. |
kErrorNoCalendar | 1 |
The event is not associated with a calendar. |
kErrorNoEndDate | 3 |
The event has no end date set. |
kErrorNoStartDate | 2 |
The event has no start date set. |
kErrorObjectBelongsToDifferentStore | 11 |
The object belongs to a different calendar store. |
kErrorRecurringReminderRequiresDueDate | 18 |
The recurring reminder requires a due date. |
kErrorReminderLocationsNotSupported | 20 |
The source doesn't support locations on reminders. |
kErrorSourceDoesNotAllowCalendarAddDelete | 17 |
The source doesn’t allow calendars to be added or deleted. |
kErrorSourceDoesNotAllowEvents | 25 |
The source does not allow calendars supporting event entity types. |
kErrorSourceDoesNotAllowReminders | 24 |
The source does not allow calendars supporting reminder entity types. |
kErrorStartDateCollidesWithOtherOccurrence | 10 |
The event’s start date collides with another occurrence of the event. |
kErrorStartDateTooFarInFuture | 9 |
The start date is further into the future than the calendar can display. |
kErrorStructuredLocationsNotSupported | 19 |
The source to which this calendar belongs does not support structured locations. |
Event Span
Constant | Value | Description |
---|---|---|
kSpanFutureEvents | 1 |
Modifications to this event instance should also affect future instances of this event. |
kSpanThisEvent | 0 |
Modifications to this event instance should affect only this instance. |
Week Days
Constant | Value | Description |
---|---|---|
kWeekDayFriday | 6 |
Friday |
kWeekDayMonday | 2 |
Monday |
kWeekDaySaturday | 7 |
Saturday |
kWeekDaySunday | 1 |
Sunday |
kWeekDayThursday | 5 |
Thursday |
kWeekDayTuesday | 3 |
Tuesday |
kWeekDayWednesday | 4 |
Wednesday |
Super class EKObjectMBS
- property Handle as Integer
- 6 methods
- method Constructor Private
- method hasChanges as boolean
- method isNew as boolean
- method refresh as boolean
- method reset
- method rollback
This class has no sub classes.
Some methods using this class:
- EKCalendarMBS.calendarForEntityType(entityType as Integer, eventStore as EKEventStoreMBS) as EKCalendarMBS
- EKCalendarMBS.Constructor(entityType as Integer, eventStore as EKEventStoreMBS)
- EKEventMBS.Constructor(eventStore as EKEventStoreMBS)
- EKEventMBS.eventWithEventStore(eventStore as EKEventStoreMBS) as EKEventMBS
- EKReminderMBS.Constructor(eventStore as EKEventStoreMBS)
- EKReminderMBS.reminderWithEventStore(eventStore as EKEventStoreMBS) as EKReminderMBS
Some examples using this class:
Blog Entries
- MBS Xojo Plugins, version 24.1pr1
- MBS Xojo Plugins, version 22.0pr7
- MBS Xojo Plugins, version 18.1pr5
Release notes
- Version 24.1
- Added requestWriteOnlyAccessToEvents, requestFullAccessToReminders and requestFullAccessToEvents to EKEventStoreMBS class.
- Version 22.0
- Added Constructor with sources and delegateSources to EKEventStoreMBS class.
- Added removeEvent and saveEvent variants to EKEventStoreMBS class.
- Version 18.1
- Added eventsWithExternalIdentifier, fetchRemindersMatchingPredicateSync, remindersWithExternalIdentifier and reminderWithIdentifier functions to EKEventStoreMBS class.
The items on this page are in the following plugins: MBS Mac64bit Plugin.
EKEventMBS - EKFetchRequestMBS