Skip to content

fix(permissions): add macOS entitlements and signing config for permission visibility#9

Merged
blueberrycongee merged 1 commit intomainfrom
fix/issue5-permission-verify
Feb 21, 2026
Merged

fix(permissions): add macOS entitlements and signing config for permission visibility#9
blueberrycongee merged 1 commit intomainfrom
fix/issue5-permission-verify

Conversation

@blueberrycongee
Copy link
Copy Markdown
Owner

Problem

Users cannot find CursorLens in macOS System Settings → Privacy & Security permission lists (Screen Recording, Camera, Microphone, etc.), making it impossible to grant permissions via the system toggle switches.

PR #8 correctly added code to trigger permission request dialogs, but the app still doesn't appear in the system settings because the build was missing entitlements and hardened runtime configuration.

Root Cause

  1. No entitlements files — macOS requires apps to declare entitlements for the system to register them in privacy permission lists
  2. No hardened runtimeelectron-builder.json5 was missing hardenedRuntime: true
  3. Missing NSScreenCaptureUsageDescription — the screen recording usage description was not declared in Info.plist
  4. Native Swift helpers were unsignedsck-recorder and other helpers were compiled without codesign or entitlements

Changes

  • build/entitlements.mac.plist — Main app entitlements (camera, microphone, JIT, unsigned memory, library validation)
  • build/entitlements.mac.inherit.plist — Inherited entitlements for child processes
  • build/entitlements.native-helper.plist — Entitlements for Swift helper binaries
  • electron-builder.json5 — Enable hardenedRuntime, reference entitlements files, add NSScreenCaptureUsageDescription
  • scripts/build-native-macos-helper.mjs — Ad-hoc codesign each Swift helper with entitlements after compilation

Notes

Closes #5

…ssion visibility

- Add entitlements.mac.plist for main app (JIT, unsigned memory, library validation, camera, microphone)
- Add entitlements.mac.inherit.plist for child processes (no JIT, only what's needed)
- Add entitlements.native-helper.plist for AppKit-only helpers (cursor-kind-monitor, mouse-button-monitor)
- Add entitlements.native-helper-av.plist for AV helpers (sck-recorder, speech-transcriber)
- Enable hardenedRuntime and reference entitlements in electron-builder.json5
- Add NSScreenCaptureUsageDescription to extendInfo
- Make missing entitlements a hard build error instead of silent skip
- Per-helper entitlements based on actual framework usage

Closes #5

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@blueberrycongee blueberrycongee force-pushed the fix/issue5-permission-verify branch from bfc6f8f to 08c2ec4 Compare February 21, 2026 13:28
@blueberrycongee blueberrycongee merged commit 735a839 into main Feb 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: 权限问题,没有插入到系统中

1 participant