Migrate from CalendarStore to EventKit framework#6
Open
mgunville wants to merge 4 commits intodkaluta:masterfrom
Open
Migrate from CalendarStore to EventKit framework#6mgunville wants to merge 4 commits intodkaluta:masterfrom
mgunville wants to merge 4 commits intodkaluta:masterfrom
Conversation
CalendarStore was deprecated in macOS 10.8 and doesn't integrate with modern macOS privacy controls (TCC), causing "No calendars" errors. This migration to EventKit enables proper permission prompts and calendar/reminders access on modern macOS. Key changes: - Add EventKitStore.m for EKEventStore singleton and permission handling - Update calendarStoreImport.h with EventKit imports and compatibility typedefs - Update Makefile to link EventKit framework - Update icalBuddyFunctions.m for EventKit calendar/event/task queries - Update icalBuddyPrettyPrint.m for EKEvent/EKReminder property access - Update icalBuddyFormatting.m for CGColor to NSColor conversion - Handle EventKit API differences (URL vs url, calendarIdentifier vs uid, etc.) - Add @available checks for macOS 10.15+ CGColor API Tested: calendars, eventsToday, calendar filters, formatted output Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
- Document the EventKit migration and why it's needed - Add installation and usage instructions - Include troubleshooting section for common issues - Credit all authors in fork lineage table - Add separate LICENSE file with full attribution Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR migrates icalBuddy from the deprecated CalendarStore framework to EventKit, fixing the "No calendars" issue on modern macOS (10.14+).
The Problem
CalendarStore was deprecated in macOS 10.8 (2012) and doesn't integrate with macOS's privacy system (TCC - Transparency, Consent, and Control). On modern macOS, this causes icalBuddy to report "No calendars" even when calendars exist and permissions are granted in System Settings.
The Solution
EventKit is Apple's supported framework for calendar/reminders access. It:
Changes
EventKitStore.m- EKEventStore singleton with permission handlingcalendarStoreImport.h- EventKit imports and compatibility typedefsMakefile- Link EventKit framework, fix deprecated compiler flagsicalBuddyFunctions.m- Calendar/event/task queries using EventKit APIsicalBuddyPrettyPrint.m- Handle EKEvent/EKReminder property differencesicalBuddyFormatting.m- CGColor to NSColor conversionCompatibility
#ifdef USE_MOCKED_CALENDARSTOREguards for test compatibilityTesting
Tested on macOS with:
icalBuddy calendars✓icalBuddy eventsToday✓-ic,-ec) ✓-tf,-df,-b,-ps, etc.) ✓Note
If this PR isn't suitable for merging, it's available as a working fork at:
https://github.com/mgunville/icalBuddy64 (branch:
eventkit-migration, set as default)Anyone experiencing the "No calendars" issue on modern macOS can use that fork.