Type Method

load(withPreferredExtension:handler:)

Loads a broadcast activity view controller with a preferred extension.

Declaration

class func load(withPreferredExtension preferredExtension: String?, handler: @escaping (RPBroadcastActivityViewController?, Error?) -> Void)

Parameters

preferredExtension

The extension bundle identifier for the preferred broadcast extension service.

handler

A block that is called after the view controller is loaded.

broadcastActivityViewController

The RPBroadcastActivityViewController to be presented.

error

If an error occurred, this parameter holds an object that explains the error. Otherwise, the value of this parameter is nil. See Errors for a list of error codes specific to ReplayKit.

Discussion

Present the view controller using present(_:animated:completion:). Dismiss the view controller when the delegate’s broadcastActivityViewController(_:didFinishWith:error:) method is called.

See Also

Presenting the Broadcast Activity UI