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:

  1. 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.

  2. Create an SCRecordingOutput instance: Use the configuration created in the previous step and set a delegate to receive events.

  3. Add the configured recording output to the stream: This will prepare the stream for recording.

  4. Start the capture: Call startCapture to begin the stream and recording.

  5. Stop the capture: Call stopCapture to stop both the stream and recording. If you want to continue streaming without recording, call removeRecordingOutput instead.

For more detailed information, you can refer to the session Capture HDR content with ScreenCaptureKit at the timestamp 08:41.

Relevant Sessions