Instance Method


Allows the receiver to prepare resources in advance of capturing a still image bracket.


func prepareToCaptureStillImageBracket(from connection: AVCaptureConnection, withSettingsArray settings: [AVCaptureBracketedStillImageSettings], completionHandler handler: @escaping (Bool, Error?) -> Void)



The connection through which the still image bracket should be captured.


An array of AVCaptureBracketedStillImageSettings objects. All the array items must be of the same AVCaptureBracketedStillImageSettings subclass, or an invalidArgumentException exception is thrown.


A user provided block that will be called asynchronously once resources have successfully been allocated for the specified bracketed capture operation.

The block has two parameters:


If sufficient resources could not be allocated, this parameter is false, and the error parameter contains a non-nil error value.


The value is non-nil if an error is encountered.

If the count of the settings parameter exceeds maxBracketedCaptureStillImageCount, then AVErrorMaximumStillImageCaptureRequestsExceeded is returned.

You should not assume that the completion handler will be called on a specific thread.


Before taking a still image bracket, additional resources may need to be allocated. By calling this method first, you are able to know when the receiver is ready to capture the bracket with the specified settings array.

See Also

Still Image Bracketed Capture

var maxBracketedCaptureStillImageCount: Int

Specifies the maximum number of still images that may be taken in a single bracket.

var isLensStabilizationDuringBracketedCaptureSupported: Bool

A Boolean value that indicates whether the capture output supports lens stabilization across the duration of a bracketed capture.

var isLensStabilizationDuringBracketedCaptureEnabled: Bool

A Boolean value that specifies whether to stabilize the lens across the duration of a bracketed capture.