1 parent 1f556f4 commit 64425efCopy full SHA for 64425ef
1 file changed
OverflowBar/Services/PermissionManager.swift
@@ -24,8 +24,12 @@ final class PermissionManager: ObservableObject {
24
25
func requestScreenRecording() {
26
Task {
27
- // Enumerating shareable content is the supported macOS 15+ request
28
- // path and also registers this app in Privacy settings.
+ // Explicitly ask WindowServer/TCC to register this bundle. Merely
+ // enumerating SCShareableContent can return an empty result without
29
+ // adding the app to the Screen Recording list on macOS 26.
30
+ if !CGPreflightScreenCaptureAccess() {
31
+ _ = CGRequestScreenCaptureAccess()
32
+ }
33
_ = try? await SCShareableContent.excludingDesktopWindows(false, onScreenWindowsOnly: false)
34
refresh()
35
logger.info("Screen recording granted after request: \(self.screenRecordingGranted, privacy: .public)")
0 commit comments