Fix Screen Recording hint and skip usage reads for missing CLIs
This commit is contained in:
@@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user