Record iOS screen
Generated on 7/31/2024
1 search
To record the iOS screen, you can use the new recording API provided by ScreenCaptureKit. Here are the steps to do so:
-
Create an SCRecordingOutputConfiguration instance: This configuration will specify where to save the recorded file, and you can optionally customize the file type and video codec.
-
Create an SCRecordingOutput instance: Use the configuration created in the previous step and set a delegate to receive events.
-
Add the configured recording output to the stream: This will prepare the stream for recording.
-
Start the capture: Call
startCapture
to begin the stream and recording. -
Stop the capture: Call
stopCapture
to stop both the stream and recording. If you want to continue streaming without recording, callremoveRecordingOutput
instead.
For more detailed information, you can refer to the session Capture HDR content with ScreenCaptureKit at the timestamp 08:41.
Relevant Sessions
Introducing enterprise APIs for visionOS
Find out how you can use new enterprise APIs for visionOS to create spatial experiences that enhance employee and customer productivity on Apple Vision Pro.
Build compelling spatial photo and video experiences
Learn how to adopt spatial photos and videos in your apps. Explore the different types of stereoscopic media and find out how to capture spatial videos in your iOS app on iPhone 15 Pro. Discover the various ways to detect and present spatial media, including the new QuickLook Preview Application API in visionOS. And take a deep dive into the metadata and stereo concepts that make a photo or video spatial.
Capture HDR content with ScreenCaptureKit
Learn how to capture high dynamic colors using ScreenCaptureKit, and explore new features like HDR support, microphone capture, and straight-to-file recording.