Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

How to screenshot?

Is there anything to make a one off screenshot? like cmd+shift+3. But with code?

There is ScreenCaptureKit - but it seems to be more for video / audio streams. I thought of trying to get the first frame from the video stream. But it seems to be rather a complex workaround for a simple problem.

Answered by DTS Engineer in 836737022

You could use SCScreenshotManager captureImage(contentFilter:configuration:completionHandler:) API to capture a single frame from a stream as an image if that's what you need.

have a look here if that can help: https://superuser.com/questions/1383379/is-there-a-way-on-macos-to-take-a-screenshot-of-a-region-and-paste-it-in-a-singl

Accepted Answer

You could use SCScreenshotManager captureImage(contentFilter:configuration:completionHandler:) API to capture a single frame from a stream as an image if that's what you need.

thank you all for your answers!

How to screenshot?
 
 
Q