<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PhotoKit",
  "identifier" : "/documentation/Photos/PHContentEditingOutput",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Photos"
    ],
    "preciseIdentifier" : "c:objc(cs)PHContentEditingOutput"
  },
  "title" : "PHContentEditingOutput"
}
-->

# PHContentEditingOutput

A container to which you provide the results of editing the photo, video, or Live Photo content of a Photos asset.

```
class PHContentEditingOutput
```

## Overview

To edit an asset’s photo or video content:

1. Fetch a [`PHAsset`](/documentation/Photos/PHAsset) object that represents the photo or video to be edited.
2. Call the asset’s [`requestContentEditingInput(with:completionHandler:)`](/documentation/Photos/PHAsset/requestContentEditingInput(with:completionHandler:)) method to retrieve a [`PHContentEditingInput`](/documentation/Photos/PHContentEditingInput) object. This object provides information about the asset, the asset data to be edited, and a preview image for display.
3. Apply your edits to the asset. To allow a user to continue working with the edit later (for example, to adjust the parameters of a photo filter), create a [`PHAdjustmentData`](/documentation/Photos/PHAdjustmentData) object describing the changes.
4. Initialize a [`PHContentEditingOutput`](/documentation/Photos/PHContentEditingOutput) object. For photo- or video-only assets, provide the edited content with the [`renderedContentURL`](/documentation/Photos/PHContentEditingOutput/renderedContentURL) property. For Live Photo assets, create a [`PHLivePhotoEditingContext`](/documentation/Photos/PHLivePhotoEditingContext) object to edit the Live Photo content and pass your content editing output to the [`saveLivePhoto(to:options:completionHandler:)`](/documentation/Photos/PHLivePhotoEditingContext/saveLivePhoto(to:options:completionHandler:)) method.

For all asset types, provide your adjustment data with the [`adjustmentData`](/documentation/Photos/PHContentEditingOutput/adjustmentData) property of the content editing output.
5. Use a photo library change block to commit the edit. (For details, see [`PHPhotoLibrary`](/documentation/Photos/PHPhotoLibrary).) In the block, create a [`PHAssetChangeRequest`](/documentation/Photos/PHAssetChangeRequest) object and set its [`contentEditingOutput`](/documentation/Photos/PHAssetChangeRequest/contentEditingOutput) property to the editing output that you created.

Each [`PHPhotoLibrary`](/documentation/Photos/PHPhotoLibrary) `performChanges` call prompts the user for permission to edit the contents of the photo library—to edit multiple assets in one batch, create multiple [`PHAssetChangeRequest`](/documentation/Photos/PHAssetChangeRequest) objects within the same change block, each with its own corresponding [`PHContentEditingOutput`](/documentation/Photos/PHContentEditingOutput) object.

You can also edit assets from photo editing extensions. In this case, instead of working with a [`PHAsset`](/documentation/Photos/PHAsset) object, you implement methods in the [`PHContentEditingController`](/documentation/PhotosUI/PHContentEditingController) protocol. Photos provides a [`PHContentEditingOutput`](/documentation/Photos/PHContentEditingOutput) object when your extension begins editing. When editing is complete, Photos requests a [`PHContentEditingOutput`](/documentation/Photos/PHContentEditingOutput) object that contains the edited asset content.

## Topics

### Creating an Output Object to Edit an Existing Asset

[`init(contentEditingInput:)`](/documentation/Photos/PHContentEditingOutput/init(contentEditingInput:))

Creates an editing output from the specified editing input.

### Creating an Output Object to Edit a Newly Created Asset

[`init(placeholderForCreatedAsset:)`](/documentation/Photos/PHContentEditingOutput/init(placeholderForCreatedAsset:))

Creates an editing output for use in adding a new asset to the photo library.

### Providing Edit and Adjustment Data

[`adjustmentData`](/documentation/Photos/PHContentEditingOutput/adjustmentData)

An object describing the changes made to the asset.

[`renderedContentURL`](/documentation/Photos/PHContentEditingOutput/renderedContentURL)

The URL at which to write a file containing edited asset content.



---

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)