<!--
{
  "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/captureStillImageBracketAsynchronously(from:withSettingsArray:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVCaptureStillImageOutput(im)captureStillImageBracketAsynchronouslyFromConnection:withSettingsArray:completionHandler:"
  },
  "title" : "captureStillImageBracketAsynchronously(from:withSettingsArray:completionHandler:)"
}
-->

# captureStillImageBracketAsynchronously(from:withSettingsArray:completionHandler:)

Captures a still image bracket.

```
func captureStillImageBracketAsynchronously(from connection: AVCaptureConnection, withSettingsArray settings: [AVCaptureBracketedStillImageSettings], completionHandler handler: @escaping (CMSampleBuffer?, AVCaptureBracketedStillImageSettings?, (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 as each still image in the bracket is captured.

    The block has three parameters:

- sampleBuffer: If the capture request is successful,  contains a valid CMSampleBuffer.
- stillImageSettings: Contains the [`AVCaptureBracketedStillImageSettings`](/documentation/AVFoundation/AVCaptureBracketedStillImageSettings) object corresponding to this still image.
- error: If the bracketed capture fails, `sampleBuffer` is `NULL` and error is non-`nil`.

    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

If you have not invoked [`prepareToCaptureStillImageBracket(from:withSettingsArray:completionHandler:)`](/documentation/AVFoundation/AVCaptureStillImageOutput/prepareToCaptureStillImageBracket(from:withSettingsArray:completionHandler:)) for this still image bracket request, the bracket may not be taken immediately, as the receiver may internally need to prepare resources.

## 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)