ScreenCaptureKit doesn`t work on winlogon

I try capture screen on wingon. For start app on winlogon i register LaunchAgent to start on LoginWindow. Application is started, but callback getShareableContentExcludingDesktopWindows newer called, and application just stuck.

I’m not sure what “winlogon” is but…

If you’re trying to use ScreenCaptureKit from a pre-login context, that won’t work. I researched this earlier this year as part of a DTS incident and the end result is that ScreenCaptureKit is not currently available to pre-login agents (FB12776922). If you need to record the screen in that environment, use a legacy API like CGDisplayStream.

If your product works in multiple environments — for example, a screen sharing program that runs as both a pre-login and a regular GUI agent — I recommend that you write two code paths:

  • Use ScreenCaptureKit in the regular case.

  • Use legacy APIs in the pre-login case.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

ScreenCaptureKit doesn`t work on winlogon
 
 
Q