fix(macos): declare Calendar/Reminders usage strings so EventKit tools work (#302) - #377
Open
aniketshukla1 wants to merge 1 commit into
Open
Conversation
…s work (andrewyng#302) The bundle's Info.plist declared usage strings for the mic, Desktop, Documents, Downloads and Photos, but not Calendars or Reminders. On macOS, TCC blocks EventKit access OUTRIGHT (no prompt) when the usage-description key is absent, so a calendar/reminders MCP tool silently fails with no way for the user to grant access. Add the Calendar and Reminders usage strings. macOS 14 split the key into a ...FullAccessUsageDescription variant (read by apps built against the 14+ SDK) and the legacy key (older systems), so both are declared for each. Like the existing Photos entry — and unlike the mic, a hardened-runtime *device* resource that also needs an entitlement — these personal-information resources are gated by the usage string alone on this non-sandboxed, hardened-runtime app. Info.plist passes plutil -lint; each new key reads back via plutil -extract.
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
Closes #302.
Calendar/reminders MCP tools silently fail on macOS with no permission prompt. The app bundle's
Info.plistdeclares usage strings for the microphone, Desktop, Documents, Downloads and Photos, but not Calendars or Reminders. macOS' TCC blocks EventKit access outright (rather than prompting) when the usage-description key is missing, so the user never gets a chance to grant access and the tool just fails.Fix
Add the Calendar and Reminders usage strings to
surfaces/gui/src-tauri/Info.plist(Tauri merges this file into the bundle'sInfo.plist).macOS 14 split the calendar/reminders keys, so each is declared in both forms for compatibility:
NSCalendarsFullAccessUsageDescriptionNSCalendarsUsageDescriptionNSRemindersFullAccessUsageDescriptionNSRemindersUsageDescriptionAn app built against the 14+ SDK reads the
...FullAccessvariant; older systems read the legacy key. Declaring both means the prompt works regardless of which SDK the release is built against or which macOS it runs on. Full-access (not write-only) is used because the calendar tools both read and create/delete events.Why no entitlement is needed
The app is not sandboxed (
entitlements.plisthas only hardened-runtime keys, nocom.apple.security.app-sandbox). It already follows the pattern of gating personal-information resources by the usage string alone —NSPhotoLibraryUsageDescriptionis present with nocom.apple.security.personal-information.photos-libraryentitlement. Calendars/Reminders are the same class of resource as Photos, so they're handled the same way.This is deliberately different from the microphone, which needed both a usage string and
com.apple.security.device.audio-input— that's a hardened-runtime device resource, a different category from these personal-information resources. I've noted this reasoning in the file comment so the distinction is clear to future readers.Verification
plutil -lint Info.plist→OKplutil -extract <key> rawA full signed-bundle test would confirm the merged
Info.plistend to end, but that needs a signed release build; the merge itself is standard Tauri behavior already proven by the existing mic/Photos keys.