ScreenCaptureKit
Stream screen content and audio to your app with fine-grained control over what you capture.
Overview
Use ScreenCaptureKit to capture high-performance video and audio across iOS, iPadOS, macOS, tvOS, and visionOS. The framework gives you fine-grained control to select and stream only the content you want to capture, delivering media to your app as CMSampleBuffer objects with the associated metadata.
Use SCContentSharingPicker, the system screen-sharing control, as the recommended approach for letting people select content sources and manage active streams, rather than building your own selection UI. To capture content while your app is in the background, configure the appropriate Configuring background execution modes in the Signing & Capabilities pane in Xcode.
Request screen recording permission from the person before capturing content. In the Info pane of the Xcode target editor, add a NSScreenCaptureUsageDescription key with a description of why your app requires screen recording access.
Topics
Essentials
ScreenCaptureKit updatesPersistent Content CaptureCapturing screen content on iOSCapturing screen content in macOS
Shareable content
SCShareableContentSCShareableContentInfoSCShareableContentStyleSCDisplaySCRunningApplicationSCWindow
Content capture
SCStreamSCStreamConfigurationSCContentFilterSCStreamDelegateSCScreenshotManagerSCScreenshotConfigurationSCScreenshotOutputSCVideoEffectOutput
Output processing
System content-sharing picker
SCContentSharingPickerSCContentSharingPickerConfigurationSCContentSharingPickerModeSCContentSharingPickerObserver