<!--
{
  "availability" : [
    "iOS: 8.0.0 - 10.0.0",
    "iPadOS: 8.0.0 - 10.0.0",
    "macCatalyst: 13.1.0 - 13.1.0"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVCaptureStillImageOutput/prepareToCaptureStillImageBracket(from:withSettingsArray:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVCaptureStillImageOutput(im)prepareToCaptureStillImageBracketFromConnection:withSettingsArray:completionHandler:"
  },
  "title" : "prepareToCaptureStillImageBracket(from:withSettingsArray:completionHandler:)"
}
-->

# prepareToCaptureStillImageBracket(from:withSettingsArray:completionHandler:)

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, (any Error)?) -> Void)
```

## Parameters

`connection`

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

`settings`

An array of [`AVCaptureBracketedStillImageSettings`](/documentation/AVFoundation/AVCaptureBracketedStillImageSettings) objects. All the array items must be of the same [`AVCaptureBracketedStillImageSettings`](/documentation/AVFoundation/AVCaptureBracketedStillImageSettings) subclass, or an <doc://com.apple.documentation/documentation/Foundation/NSExceptionName/invalidArgumentException> exception is thrown.

`handler`

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:

- prepared: If sufficient resources could not be allocated, this parameter is <doc://com.apple.documentation/documentation/Swift/false>, and the `error` parameter contains a non-`nil` error value.
- error: The value is non-`nil` if an error is encountered.

    If the count of the     `settings`     parameter exceeds [`maxBracketedCaptureStillImageCount`](/documentation/AVFoundation/AVCaptureStillImageOutput/maxBracketedCaptureStillImageCount)    , then     `AVErrorMaximumStillImageCaptureRequestsExceeded`     is returned.

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

## Discussion

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

[`captureStillImageAsynchronously(from:completionHandler:)`](/documentation/AVFoundation/AVCaptureStillImageOutput/captureStillImageAsynchronously(from:completionHandler:))

Initiates a still image capture and returns immediately.



---

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)