Fix Screen Recording hint and skip usage reads for missing CLIs

This commit is contained in:
Ian Gulliver
2026-10-23 06:05:42 -07:00
parent c4914647de
commit 3de5f76fba
5 changed files with 18 additions and 4 deletions
+4 -2
View File
@@ -5,7 +5,9 @@ import ScreenCaptureKit
let orionBundle = "com.kagi.kagimacOS"
let deviceControl = "Device Control and Data Access"
// The server and the app each run byre-hands, and System Settings lists them as two entries: the server's helper by its file name, the app by its own.
// The server and the app each run byre-hands. Device Control and Automation list the server's helper by its file name, but Screen Recording lists it under the app it sits in.
let screenGrantee = "Byre (with byre's app icon)"
let grantee: String = {
var pid = getppid()
while pid > 1 {
@@ -32,7 +34,7 @@ func checkScreenRecording() async -> [String: String] {
return permission("Screen Recording", "granted", "Listed the screen (displays: \(content.displays.count), windows: \(content.windows.count)).", "ScreenCapture")
} catch {
CGRequestScreenCaptureAccess()
return permission("Screen Recording", "missing", "Listing the screen failed (\(error.localizedDescription)). Switch \(grantee) on in Screen Recording.", "ScreenCapture")
return permission("Screen Recording", "missing", "Listing the screen failed (\(error.localizedDescription)). Switch \(screenGrantee) on in Screen Recording.", "ScreenCapture")
}
}