The shared recorder object providing the ability to record audio and video of your app.


class RPScreenRecorder : NSObject


Apps on a user’s device can share the recording function, with each app having its own instance of RPScreenRecorder. Your app can record the audio and video inside of the app, along with user commentary through the microphone. You get a reference to the recorder through the shared() function and use it to implement start-and-stop recording functionality. You can present a user interface (view controller) where a user can trim and preview recordings, and share them with other users. Only one app at a time can use the recorder on the user's device. Your app can't record video from AVPlayer.


Accessing the Shared Recorder

class func shared() -> RPScreenRecorder

Returns an app’s instance of the shared screen recorder.

Accessing Screen Recorder Properties

var isAvailable: Bool

A Boolean value that indicates whether the screen recorder is available for recording.

var isRecording: Bool

A Boolean value that indicates whether the app is currently recording.

var isMicrophoneEnabled: Bool

A Boolean value that indicates whether the microphone is currently enabled.

var isCameraEnabled: Bool

A Boolean value that indicates whether the camera is currently enabled.

var cameraPreviewView: UIView?

A view containing the contents of the front-facing camera.

var cameraPosition: RPCameraPosition

The camera position to be used.

enum RPCameraPosition

The position of the camera being accessed.

var delegate: RPScreenRecorderDelegate?

The delegate for the screen recorder.

protocol RPScreenRecorderDelegate

The protocol you implement to receive notifications from the screen recorder.


Inherits From

Conforms To

See Also

Replay Sharing

class RPPreviewViewController

An object that displays a user interface where users preview and edit a screen recording created with ReplayKit.