Skip to content

Add NSCalendarsFullAccessUsageDescription to Info.plist#3860

Open
souljedi wants to merge 1 commit intoHammerspoon:masterfrom
souljedi:add-calendar-usage-description
Open

Add NSCalendarsFullAccessUsageDescription to Info.plist#3860
souljedi wants to merge 1 commit intoHammerspoon:masterfrom
souljedi:add-calendar-usage-description

Conversation

@souljedi
Copy link
Copy Markdown

Problem

Without NSCalendarsFullAccessUsageDescription in Info.plist, macOS silently refuses to prompt the user for Calendar access. Hammerspoon never appears in System Settings → Privacy & Security → Calendars, and all calendar-data reads (via AppleScript or EventKit) fail silently.

This was reported in #3803.

Fix

Add the two missing privacy usage description keys, following the same wording pattern as the existing NSCameraUsageDescription, NSMicrophoneUsageDescription, etc. entries:

  • NSCalendarsFullAccessUsageDescription — required on macOS 14+ for full EventKit access
  • NSCalendarsUsageDescription — legacy key, honoured on macOS ≤ 13

Testing

  1. Apply the patch and build
  2. Launch Hammerspoon
  3. Run in the console:
    hs.osascript.applescript('tell application "Calendar" to get name of every calendar')
  4. macOS should now show the Calendar permission dialog for Hammerspoon

Closes #3803

Without this key macOS silently refuses to prompt for Calendar access,
so Hammerspoon never appears in System Settings → Privacy & Security →
Calendars and all calendar-data reads fail.

Also adds the legacy NSCalendarsUsageDescription for macOS ≤ 13
compatibility.

Fixes Hammerspoon#3803
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pull request does not contain a valid label. Please add one of the following labels: ['pr-fix', 'pr-change', 'pr-feature', 'pr-maintenance']

@latenitefilms latenitefilms added the pr-fix Pull Request implementing a bug fix label Mar 31, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 27.40%. Comparing base (08e93f6) to head (bc8e8ba).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3860   +/-   ##
=======================================
  Coverage   27.39%   27.40%           
=======================================
  Files         191      191           
  Lines       51537    51537           
=======================================
+ Hits        14119    14124    +5     
+ Misses      37418    37413    -5     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@souljedi
Copy link
Copy Markdown
Author

Is there anything i should change? It looks like the timeout for some of the tests may have been to short?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-fix Pull Request implementing a bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot read calendar with applescript

3 participants