<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVCapturePhotoCaptureDelegate/photoOutput(_:didFinishCapturingDeferredPhotoProxy:error:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(pl)AVCapturePhotoCaptureDelegate(im)captureOutput:didFinishCapturingDeferredPhotoProxy:error:"
  },
  "title" : "photoOutput(_:didFinishCapturingDeferredPhotoProxy:error:)"
}
-->

# photoOutput(_:didFinishCapturingDeferredPhotoProxy:error:)

Tells the delegate when the system finishes capturing the photo proxy.

```
optional func photoOutput(_ output: AVCapturePhotoOutput, didFinishCapturingDeferredPhotoProxy deferredPhotoProxy: AVCaptureDeferredPhotoProxy?, error: (any Error)?)
```

## Parameters

`output`

The output instance.

`deferredPhotoProxy`

A [`AVCaptureDeferredPhotoProxy`](/documentation/AVFoundation/AVCaptureDeferredPhotoProxy) instance that contains a proxy <doc://com.apple.documentation/documentation/CoreVideo/cvpixelbuffer-q2e> as a placeholder for the final image.

`error`

If the system couldn’t create the photo proxy, or any of the underlying intermediate files, an error object that describes the failure.

## Discussion

You can use the output’s [`fileDataRepresentation()`](/documentation/AVFoundation/AVCapturePhoto/fileDataRepresentation()) with <doc://com.apple.documentation/documentation/Photos/PHAssetCreationRequest> to eventually produce the final, processed photo into the user’s Photo Library. Add the in-memory proxy file data representation to the photo library as quickly as possible after this call to ensure that the photo library can begin background processing. It’s also important so that the intermediates aren’t removed by a periodic clean-up job looking for abandoned intermediates produced by using the deferred photo processing APIs.

Your delegate implementation must adopt this method to opt into deferred photo processing, otherwise calling [`capturePhoto(with:delegate:)`](/documentation/AVFoundation/AVCapturePhotoOutput/capturePhoto(with:delegate:)) throws an exception.

---

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)