<!--
{
  "availability" : [
    "iOS: 10.0.0 - 27.0.0",
    "iPadOS: 10.0.0 - 27.0.0",
    "macCatalyst: 13.1.0 - 27.0.0",
    "macOS: 11.0.0 - 27.0.0",
    "tvOS: 10.0.0 - 27.0.0",
    "visionOS: 1.0.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "ReplayKit",
  "identifier" : "/documentation/ReplayKit/RPScreenRecorder/startRecording(handler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "ReplayKit"
    ],
    "preciseIdentifier" : "c:objc(cs)RPScreenRecorder(im)startRecordingWithHandler:"
  },
  "title" : "startRecording(handler:)"
}
-->

# startRecording(handler:)

Starts recording the app display.

```
func startRecording(handler: (((any Error)?) -> Void)? = nil)
```

## Parameters

`handler`

A block that is called when the request completes.

- `error`: If an error occurred, this parameter holds an object that explains the error. Otherwise, the value of this parameter is `nil`. See [`RPRecordingErrorCode`](/documentation/ReplayKit/RPRecordingErrorCode) for a list of error codes specific to ReplayKit.

## Discussion

Call [`startRecording(handler:)`](/documentation/ReplayKit/RPScreenRecorder/startRecording(handler:)) on an instance of the recorder to begin recording. When [`startRecording(handler:)`](/documentation/ReplayKit/RPScreenRecorder/startRecording(handler:)) is first called, an alert window appears asking the user to confirm recording. This alert window is also presented if it has been longer than 8 minutes since the last time [`startRecording(handler:)`](/documentation/ReplayKit/RPScreenRecorder/startRecording(handler:)) was called.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)