eventkit 0.4.0

Safe Rust bindings for Apple's EventKit framework — events, reminders, calendars, sources, participants, structured locations, and virtual conference descriptors on macOS
Documentation
# EventKit.framework coverage audit

This document covers `eventkit` v0.4.0. It was written against the public EventKit headers of the macOS 26.2 SDK and re-checked on 2026-09-23 against the installed 26.5 and 27.0 SDKs, which declare the same top-level EventKit symbols:

- `EKAlarm.h`
- `EKCalendar.h`
- `EKCalendarItem.h`
- `EKEvent.h`
- `EKEventStore.h`
- `EKParticipant.h`
- `EKRecurrenceRule.h`
- `EKReminder.h`
- `EKSource.h`
- `EKStructuredLocation.h`
- `EKTypes.h`
- `EKVirtualConferenceDescriptor.h`
- `EKVirtualConferenceProvider.h`

Legend:

- ✅ implemented in the safe Rust surface
- 🟡 implemented with an intentionally adapted safe representation
- ⏭️ intentionally skipped

## EventStore

| Header API | Status | Rust surface / notes |
| --- | --- | --- |
| `+[EKEventStore authorizationStatusForEntityType:]` | ✅ | `EKEventStore::authorization_status` |
| `-init` | ✅ | `EKEventStore::new` |
| `-initWithSources:` | ✅ | `EKEventStore::with_source_identifiers` |
| `-initWithAccessToEntityTypes:` | ⏭️ | Deprecated initializer; the crate targets the modern full-access/write-only access APIs instead. |
| `-requestFullAccessToEventsWithCompletion:` | ✅ | `EKEventStore::request_full_access_to_events`; the synchronous wrappers wait up to 30 s and then return `EventKitError::TimedOut`, and `AsyncEventStore` waits without a timeout. |
| `-requestWriteOnlyAccessToEventsWithCompletion:` | ✅ | `EKEventStore::request_write_only_access_to_events` |
| `-requestFullAccessToRemindersWithCompletion:` | ✅ | `EKEventStore::request_full_access_to_reminders` |
| `-requestAccessToEntityType:completion:` | ✅ | `request_access_to_events` / `request_access_to_reminders` compatibility helpers call the modern APIs on macOS 14+ and the deprecated API on older releases. |
| `eventStoreIdentifier` | ✅ | `EKEventStore::event_store_identifier` |
| `sources` / `delegateSources` / `sourceWithIdentifier:` | ✅ | `sources`, `delegate_sources`, `source_with_identifier` |
| `calendars` | ⏭️ | Deprecated in the headers; use entity-specific calendar lookup. |
| `calendarsForEntityType:` | ✅ | `calendars_for_entity_type` |
| `defaultCalendarForNewEvents` / `defaultCalendarForNewReminders` | ✅ | `default_calendar_for_new_events`, `default_calendar_for_new_reminders` |
| `calendarWithIdentifier:` | ✅ | `calendar_with_identifier` |
| `saveCalendar:commit:error:` / `removeCalendar:commit:error:` | ✅ | `save_calendar`, `remove_calendar`, `remove_calendar_by_identifier` |
| `calendarItemWithIdentifier:` / `calendarItemsWithExternalIdentifier:` | ✅ | `calendar_item_with_identifier`, `calendar_items_with_external_identifier` |
| `saveEvent:span:commit:error:` / `removeEvent:span:commit:error:` | ✅ | `save_event`, `remove_event`. For a recurring event they act on the occurrence named by the snapshot's `occurrence_date` and return an error if it can't be found. |
| `eventWithIdentifier:` / `eventsMatchingPredicate:` | ✅ | `event_with_identifier` (the first occurrence, as in EventKit), `events_matching`. Ranges longer than EventKit's four-year limit are queried in chunks. Unknown calendar identifiers return `EventKitError::InvalidArgument`, and an empty calendar list matches nothing. |
| `enumerateEventsMatchingPredicate:usingBlock:` | 🟡 | `enumerate_events_matching` fetches all matching events through `events_matching` and then calls the closure for each one until it returns `false`; it doesn't stream. |
| `predicateForEventsWithStartDate:endDate:calendars:` | ✅ | `predicate_for_events` |
| `saveReminder:commit:error:` / `removeReminder:commit:error:` | ✅ | `save_reminder`, `remove_reminder` |
| `fetchRemindersMatchingPredicate:completion:` | ✅ | `fetch_reminders_matching` exposes a synchronous safe wrapper. |
| `cancelFetchRequest:` | ✅ | Used internally by the synchronous wrapper when its timeout/cancel path is triggered. |
| `predicateForRemindersInCalendars:` / `predicateForIncompleteRemindersWithDueDateStarting:ending:calendars:` / `predicateForCompletedRemindersWithCompletionDateStarting:ending:calendars:` | ✅ | `predicate_for_reminders`, `predicate_for_incomplete_reminders`, `predicate_for_completed_reminders` |
| `commit:` / `reset` / `refreshSourcesIfNecessary` | ✅ | `commit`, `reset`, `refresh_sources_if_necessary` |
| `EKEventStoreChangedNotification` | ✅ | `EK_EVENT_STORE_CHANGED_NOTIFICATION` |

## Calendar and Source

| Header API | Status | Rust surface / notes |
| --- | --- | --- |
| `+[EKCalendar calendarForEntityType:eventStore:]` | ✅ | `EKCalendarDraft` and store save flows cover calendar creation. |
| `+[EKCalendar calendarWithEventStore:]` | ⏭️ | Deprecated convenience constructor. |
| `calendarIdentifier` / `title` / `type` / `source` | ✅ | Snapshot fields on `EKCalendar`; drafts use `source_identifier`. |
| `allowsContentModifications` / `isSubscribed` / `isImmutable` | ✅ | Snapshot fields on `EKCalendar` |
| `CGColor` / `color` | 🟡 | Surfaced as an RGBA hex string for stable Rust serialization. |
| `supportedEventAvailabilities` / `allowedEntityTypes` | 🟡 | Surfaced as `Vec<EKCalendarEventAvailability>` and `Vec<EKEntityType>` instead of raw bitmasks. |
| `EKSource.sourceIdentifier` / `sourceType` / `title` / `isDelegate` | ✅ | Snapshot fields on `EKSource` |
| `EKSource.calendarsForEntityType:` | ✅ | `EKSource::calendars_for_entity_type` |
| `EKSource.calendars` | ⏭️ | Deprecated in the headers; use the entity-specific variant. |

## Event, calendar items, and participants

| Header API | Status | Rust surface / notes |
| --- | --- | --- |
| `EKCalendarItem` common properties (`calendar`, identifiers, title, location, notes, URL, dates, time zone)` | ✅ | Shared snapshot fields on `EKEvent`, `EKReminder`, and `EKCalendarItem`. |
| `EKCalendarItem` alarms / attendees / recurrence rules / `has*` flags | ✅ | Safe snapshot fields plus round-trip helpers. |
| `EKCalendarItem` mutation helpers (`addAlarm:`, `removeAlarm:`, `addRecurrenceRule:`, `removeRecurrenceRule:`) | ✅ | Expressed through safe Rust snapshots that are saved back through `EKEventStore`. |
| `EKCalendarItem.UUID` | ⏭️ | Deprecated in the headers. |
| `EKObject` state helpers (`hasChanges`, `isNew`, `reset`, `rollback`, `refresh`) | ✅ | `EKObject`, plus `as_object_in` helpers on `EKEvent`, `EKReminder`, and `EKCalendarDraft`. |
| `+[EKEvent eventWithEventStore:]` | ✅ | Covered by `EKEvent::roundtrip_in` and `EKEventStore::save_event`. |
| `eventIdentifier` / `allDay` / `startDate` / `endDate` | ✅ | Snapshot fields on `EKEvent` |
| `organizer` / `structuredLocation` / `availability` / `status` / `isDetached` / `occurrenceDate` | ✅ | Snapshot fields on `EKEvent` |
| `birthdayContactIdentifier` / `birthdayPersonUniqueID` | ✅ | Snapshot fields on `EKEvent` |
| `birthdayPersonID` | ⏭️ | iOS-only (`NS_DEPRECATED_IOS`), so it isn't read on macOS. Use `birthdayContactIdentifier`. |
| `-compareStartDateWithEvent:` | ✅ | `compare_start_date`; the inherited `refresh` method is available on `EKObject`. |
| `EKParticipant` URL, name, status, role, type, current-user flag | ✅ | Snapshot fields on `EKParticipant` |
| `EKParticipant.contactPredicate` | 🟡 | Surfaced as an optional predicate-format string instead of an opaque `NSPredicate`. |
| `EKParticipantScheduleStatus` | ✅ | `EKParticipantScheduleStatus`; the macOS headers define the enum even though current `EKParticipant` properties do not expose it directly. |
| `EKParticipant` legacy AddressBook accessors | ⏭️ | Deprecated/legacy AddressBook APIs are intentionally not exposed. |

## Reminder and date components

| Header API | Status | Rust surface / notes |
| --- | --- | --- |
| `+[EKReminder reminderWithEventStore:]` | ✅ | Covered by `EKReminder::roundtrip_in` and `EKEventStore::save_reminder`. |
| `startDateComponents` / `dueDateComponents` | ✅ | `NSDateComponents` snapshot type with calendar/time-zone support. |
| `completed` / `completionDate` / `priority` | ✅ | Snapshot fields on `EKReminder`; `priority` uses `EKReminderPriority`. |

## Recurrence rules

| Header API | Status | Rust surface / notes |
| --- | --- | --- |
| `EKRecurrenceFrequency` / `EKWeekday` enums | ✅ | `EKRecurrenceFrequency`, `EKWeekday` |
| `EKRecurrenceDayOfWeek` init and weekday/week-number accessors | ✅ | `EKRecurrenceDayOfWeek::new` and snapshot fields |
| `EKRecurrenceEnd` end-date / occurrence-count factories | ✅ | `EKRecurrenceEnd::with_end_date`, `with_occurrence_count` |
| `EKRecurrenceRule` designated/simple initializers | ✅ | `EKRecurrenceRule::new` and its `with_*` builders, plus round-trip helpers. The bridge checks the documented preconditions (positive interval and occurrence count, week numbers from -53 to 53 and 0 for weekly rules, and the documented value ranges) before calling the initializers, which raise on invalid input, and returns `EventKitError::InvalidArgument`. |
| `calendarIdentifier` / `recurrenceEnd` / `frequency` / `interval` / `firstDayOfTheWeek` | ✅ | Snapshot fields on `EKRecurrenceRule` |
| `daysOfTheWeek` / `daysOfTheMonth` / `daysOfTheYear` / `weeksOfTheYear` / `monthsOfTheYear` / `setPositions` | ✅ | Snapshot fields on `EKRecurrenceRule` |

## Alarm and structured location

| Header API | Status | Rust surface / notes |
| --- | --- | --- |
| `+[EKAlarm alarmWithAbsoluteDate:]` / `+[EKAlarm alarmWithRelativeOffset:]` | ✅ | `EKAlarm` round-trip helpers support both forms. |
| `relativeOffset` / `absoluteDate` / `structuredLocation` / `proximity` / `type` / `emailAddress` / `soundName` | ✅ | Snapshot fields on `EKAlarm` |
| `url` | 🟡 | Deprecated since macOS 10.9 and not imported by Swift, so it's bridged through KVC after checking that the accessor exists. |
| `+[EKStructuredLocation locationWithTitle:]` | ✅ | `EKStructuredLocation` round-trip helpers |
| `title` / `geoLocation` / `radius` | ✅ | Snapshot fields on `EKStructuredLocation` and `EKGeoLocation` |
| `+[EKStructuredLocation locationWithMapItem:]` | ⏭️ | Intentionally skipped to avoid forcing a `MapKit` dependency into the crate. |

## Virtual conference descriptors

| Header API | Status | Rust surface / notes |
| --- | --- | --- |
| `EKVirtualConferenceRoomTypeDescriptor` init/title/identifier | ✅ | `EKVirtualConferenceRoomTypeDescriptor` |
| `EKVirtualConferenceURLDescriptor` init/title/url | ✅ | `EKVirtualConferenceURLDescriptor` |
| `EKVirtualConferenceDescriptor` init/title/URL descriptors/conference details | ✅ | `EKVirtualConferenceDescriptor` |
| `EKVirtualConferenceProvider` fetch hooks | ⏭️ | These are app-extension subclass hooks, not normal runtime APIs. The crate exposes `EK_VIRTUAL_CONFERENCE_PROVIDER_IS_EXTENSION_ONLY` and the descriptor types used by provider implementations. |

## Notes

- The public Rust surface intentionally favors stable, serializable snapshot types over direct exposure of Objective-C reference semantics.
- Deprecated APIs that only duplicate a modern equivalent are skipped unless they materially improve compatibility.
- The integration tests and examples validate one headless-safe path per logical area. When calendar access is granted they read the user's calendars and reminders, but they never save or remove items. Mutating EventKit objects still depends on the caller's entitlements and privacy permissions.
- Saving an event or reminder writes only the fields that differ from the stored item. Unchanged alarms and recurrence rules are left as they are, so values the snapshot types can't represent survive a save.
- The snapshot types' `Debug` output redacts titles, notes, locations, URLs, names, email addresses, coordinates and meeting details.