Status: Accepted Date: 2024
KeyPath can check permissions via:
- Apple APIs (
IOHIDCheckAccessfrom GUI context) - TCC database queries
- Functional verification (try to use the API)
These sometimes give conflicting results.
Apple APIs ALWAYS take precedence over TCC database.
-
APPLE APIs (IOHIDCheckAccess from GUI context) → AUTHORITATIVE
.granted/.denied→ TRUST THIS RESULT.unknown→ Proceed to TCC fallback
-
TCC DATABASE → NECESSARY FALLBACK for
.unknowncases- Required for chicken-and-egg wizard scenarios
-
FUNCTIONAL VERIFICATION → Disabled in TCP-only mode
- Trust Apple API results unconditionally
- Only use TCC database when Apple API returns
.unknown - Log source clearly: "gui-check" vs "tcc-fallback"
- TCC database is a cache that can be stale
- Apple API reflects actual system state
- Root processes get unreliable results from TCC