From 78fa9068a6f006c3580ed27b290272c668417660 Mon Sep 17 00:00:00 2001 From: Tomas Camin Date: Thu, 29 Dec 2022 15:23:09 +0100 Subject: [PATCH] Request screen recording permissions --- SBTUITunnelHostServer/Sources/AppDelegate.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SBTUITunnelHostServer/Sources/AppDelegate.swift b/SBTUITunnelHostServer/Sources/AppDelegate.swift index 39fb179..d1b01d4 100644 --- a/SBTUITunnelHostServer/Sources/AppDelegate.swift +++ b/SBTUITunnelHostServer/Sources/AppDelegate.swift @@ -57,6 +57,10 @@ class AppDelegate: NSObject, NSApplicationDelegate, GCDWebServerDelegate { } func startup() { + if !CGPreflightScreenCaptureAccess() { + CGRequestScreenCaptureAccess() + } + server?.stop() server = GCDWebServer()