---
title: "captureStillImageBracketAsynchronously(from:withSettingsArray:completionHandler:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avcapturestillimageoutput/capturestillimagebracketasynchronously(from:withsettingsarray:completionhandler:)"
---

# captureStillImageBracketAsynchronously(from:withSettingsArray:completionHandler:)

Captures a still image bracket.

## Declaration

```swift
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 doc://com.apple.avfoundation/documentation/AVFoundation/AVCaptureBracketedStillImageSettings objects. All the array items must be of the same doc://com.apple.avfoundation/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: If the count of the settings parameter exceeds doc://com.apple.avfoundation/documentation/AVFoundation/AVCaptureStillImageOutput/maxBracketedCaptureStillImageCount, then AVErrorMaximumStillImageCaptureRequestsExceeded is returned. You should not assume that the completion handler will be called on a specific thread.

## Discussion

Discussion If you have not invoked 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

### Related Documentation

- [captureStillImageAsynchronously(from:completionHandler:)](avfoundation/avcapturestillimageoutput/capturestillimageasynchronously(from:completionhandler:).md)

### Still image bracketed capture

- [maxBracketedCaptureStillImageCount](avfoundation/avcapturestillimageoutput/maxbracketedcapturestillimagecount.md)
- [prepareToCaptureStillImageBracket(from:withSettingsArray:completionHandler:)](avfoundation/avcapturestillimageoutput/preparetocapturestillimagebracket(from:withsettingsarray:completionhandler:).md)
- [isLensStabilizationDuringBracketedCaptureSupported](avfoundation/avcapturestillimageoutput/islensstabilizationduringbracketedcapturesupported.md)
- [isLensStabilizationDuringBracketedCaptureEnabled](avfoundation/avcapturestillimageoutput/islensstabilizationduringbracketedcaptureenabled.md)
