var
DeprecatediOSmacOSvisionOS
cameraPosition
DeprecatediOSmacOSvisionOSopen var cameraPosition: RPCameraPositionDeprecatedUse SCVideoEffectOutput cameraDevice instead
What's New / Media, Audio & Capture
ReplayKit records and live-streams audio and video from iOS, iPadOS, and tvOS apps, and routes captured content to third-party broadcast services.
The 27 SDK deprecates 44 symbols and adds or removes nothing. The deprecations cover RPBroadcastActivityViewControllerDelegate and RPBroadcastControllerDelegate (including their broadcastActivityViewController and broadcastController callbacks), the load API, and NSExtensionContext.loadBroadcastingApplicationInfo.
cameraPositionopen var cameraPosition: RPCameraPositioncameraPreviewViewopen var cameraPreviewView: UIView? { get }cameraPreviewViewopen var cameraPreviewView: NSView? { get }delegateweak open var delegate: (any RPScreenRecorderDelegate)?discardRecordingopen func discardRecording(handler: @escaping () -> Void)exportClipopen func exportClip(to url: URL, duration: TimeInterval, completionHandler: (@Sendable ((any Error)?) -> Void)? = nil)exportClipopen func exportClip(to url: URL, duration: TimeInterval) async throwsisAvailableopen var isAvailable: Bool { get }isCameraEnabledopen var isCameraEnabled: BoolisMicrophoneEnabledopen var isMicrophoneEnabled: BoolisRecordingopen var isRecording: Bool { get }loadopen class func load(withPreferredExtension preferredExtension: String?, handler: @escaping (RPBroadcastActivityViewController?, (any Error)?) -> Void)RPApplicationInfoBundleIdentifierKeypublic let RPApplicationInfoBundleIdentifierKey: StringRPBroadcastActivityControllerDelegatepublic protocol RPBroadcastActivityControllerDelegate : NSObjectProtocolpublic protocol RPBroadcastActivityControllerDelegate : NSObjectProtocol {
@available(macOS, introduced: 11.0, deprecated: 27.0, message: "No longer supported")
func broadcastActivityController(_ broadcastActivityController: RPBroadcastActivityController, didFinishWith broadcastController: RPBroadcastController?, error: (any Error)?)
}RPBroadcastActivityViewControllerDelegatepublic protocol RPBroadcastActivityViewControllerDelegate : NSObjectProtocolpublic protocol RPBroadcastActivityViewControllerDelegate : NSObjectProtocol {
@available(iOS, introduced: 10.0, deprecated: 27.0, message: "No longer supported")
func broadcastActivityViewController(_ broadcastActivityViewController: RPBroadcastActivityViewController, didFinishWith broadcastController: RPBroadcastController?, error: (any Error)?)
}RPBroadcastControllerDelegatepublic protocol RPBroadcastControllerDelegate : NSObjectProtocolpublic protocol RPBroadcastControllerDelegate : NSObjectProtocol {
optional func broadcastController(_ broadcastController: RPBroadcastController, didFinishWithError error: (any Error)?)
optional func broadcastController(_ broadcastController: RPBroadcastController, didUpdateServiceInfo serviceInfo: [String : any NSCoding & NSObjectProtocol])
@available(iOS, introduced: 11.0, deprecated: 27.0, message: "No longer supported")
optional func broadcastController(_ broadcastController: RPBroadcastController, didUpdateBroadcast broadcastURL: URL)
}RPCameraPositionpublic enum RPCameraPosition : Int, @unchecked Sendablepublic enum RPCameraPosition : Int, @unchecked Sendable {
case front = 1
case back = 2
}RPPreviewViewControllerDelegatepublic protocol RPPreviewViewControllerDelegate : NSObjectProtocolpublic protocol RPPreviewViewControllerDelegate : NSObjectProtocol {
optional func previewControllerDidFinish(_ previewController: RPPreviewViewController)
optional func previewController(_ previewController: RPPreviewViewController, didFinishWithActivityTypes activityTypes: Set<String>)
}RPSampleBufferTypepublic enum RPSampleBufferType : Int, @unchecked Sendablepublic enum RPSampleBufferType : Int, @unchecked Sendable {
case video = 1
case audioApp = 2
case audioMic = 3
}RPScreenRecorderDelegatepublic protocol RPScreenRecorderDelegate : NSObjectProtocolpublic protocol RPScreenRecorderDelegate : NSObjectProtocol {
/** @abstract Called when recording has stopped due to an error.
@param screenRecorder The instance of the screen recorder.
@param error An NSError describing why recording has stopped in the RPRecordingErrorDomain.
@param previewViewController If a partial movie is available before it was stopped, an instance of RPPreviewViewController will be returned.
*/
@available(iOS, introduced: 9.0, deprecated: 10.0, message: "No longer supported")
optional func screenRecorder(_ screenRecorder: RPScreenRecorder, didStopRecordingWithError error: any Error, previewViewController: RPPreviewViewController?)
@available(iOS, introduced: 11.0, deprecated: 27.0, message: "Use ScreenCaptureKit SCStream with SCRecordingOutput instead")
optional func screenRecorder(_ screenRecorder: RPScreenRecorder, didStopRecordingWith previewViewController: RPPreviewViewController?, error: (any Error)?)
/** @abstract Called when the recorder becomes available or stops being available. Check the screen recorder's availability property to check the current availability state. Possible reasons for the recorder to be unavailable include an in-progress Airplay/TVOut session or unsupported hardware.
@param screenRecorder The instance of the screen recorder.
*/
@available(iOS, introduced: 9.0, deprecated: 27.0, message: "Use ScreenCaptureKit instead")
optional func screenRecorderDidChangeAvailability(_ screenRecorder: RPScreenRecorder)
}RPVideoSampleOrientationKeypublic let RPVideoSampleOrientationKey: StringshowBroadcastPickeropen class func showBroadcastPicker(at point: CGPoint, from window: NSWindow?, preferredExtensionIdentifier preferredExtension: String?, completionHandler handler: @escaping @Sendable (RPBroadcastActivityController?, (any Error)?) -> Void)showBroadcastPickeropen class func showBroadcastPicker(at point: CGPoint, from window: NSWindow?, preferredExtensionIdentifier preferredExtension: String?) async throws -> RPBroadcastActivityControllerstartCaptureopen func startCapture(handler captureHandler: ((CMSampleBuffer, RPSampleBufferType, (any Error)?) -> Void)?, completionHandler: (@Sendable ((any Error)?) -> Void)? = nil)startCaptureopen func startCapture(handler captureHandler: ((CMSampleBuffer, RPSampleBufferType, (any Error)?) -> Void)?) async throwsstartClipBufferingopen func startClipBuffering(completionHandler: (@Sendable ((any Error)?) -> Void)? = nil)startClipBufferingopen func startClipBuffering() async throwsstartRecordingopen func startRecording(handler: (((any Error)?) -> Void)? = nil)stopCaptureopen func stopCapture(handler: (((any Error)?) -> Void)? = nil)stopClipBufferingopen func stopClipBuffering(completionHandler: (@Sendable ((any Error)?) -> Void)? = nil)stopClipBufferingopen func stopClipBuffering() async throwsstopRecordingopen func stopRecording(handler: ((RPPreviewViewController?, (any Error)?) -> Void)? = nil)stopRecordingopen func stopRecording(withOutput url: URL, completionHandler: (@Sendable ((any Error)?) -> Void)? = nil)stopRecordingopen func stopRecording(withOutput url: URL) async throwsNSExtensionContext.completeRequestopen func completeRequest(withBroadcast broadcastURL: URL, setupInfo: [String : any NSCoding & NSObjectProtocol]?)NSExtensionContext.loadBroadcastingApplicationInfoopen func loadBroadcastingApplicationInfo(completion handler: @escaping @Sendable (String, String, UIImage?) -> Void)NSExtensionContext.loadBroadcastingApplicationInfoopen func loadBroadcastingApplicationInfo() async -> (String, String, UIImage?)NSExtensionContext.loadBroadcastingApplicationInfoopen func loadBroadcastingApplicationInfo(completion handler: @escaping @Sendable (String, String, NSImage?) -> Void)NSExtensionContext.loadBroadcastingApplicationInfoopen func loadBroadcastingApplicationInfo() async -> (String, String, NSImage?)RPBroadcastActivityControllerDelegate.broadcastActivityControllerfunc broadcastActivityController(_ broadcastActivityController: RPBroadcastActivityController, didFinishWith broadcastController: RPBroadcastController?, error: (any Error)?)RPBroadcastActivityViewControllerDelegate.broadcastActivityViewControllerfunc broadcastActivityViewController(_ broadcastActivityViewController: RPBroadcastActivityViewController, didFinishWith broadcastController: RPBroadcastController?, error: (any Error)?)RPBroadcastControllerDelegate.broadcastControlleroptional func broadcastController(_ broadcastController: RPBroadcastController, didUpdateBroadcast broadcastURL: URL)RPScreenRecorderDelegate.screenRecorderoptional func screenRecorder(_ screenRecorder: RPScreenRecorder, didStopRecordingWith previewViewController: RPPreviewViewController?, error: (any Error)?)RPScreenRecorderDelegate.screenRecorderDidChangeAvailabilityoptional func screenRecorderDidChangeAvailability(_ screenRecorder: RPScreenRecorder)No APIs match your filter.