---
title: PHContentEditingOutput
framework: photos
role: symbol
role_heading: Class
path: photos/phcontenteditingoutput
---

# PHContentEditingOutput

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

## Declaration

```swift
class PHContentEditingOutput
```

## Mentioned in

Editing Asset Content Creating Photo Editing Extensions Requesting Changes to the Photo Library

## Overview

Overview To edit an asset’s photo or video content: Fetch a PHAsset object that represents the photo or video to be edited. Call the asset’s requestContentEditingInput(with:completionHandler:) method to retrieve a PHContentEditingInput object. This object provides information about the asset, the asset data to be edited, and a preview image for display. 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 object describing the changes. Initialize a PHContentEditingOutput object. For photo- or video-only assets, provide the edited content with the renderedContentURL property. For Live Photo assets, create a PHLivePhotoEditingContext object to edit the Live Photo content and pass your content editing output to the saveLivePhoto(to:options:completionHandler:) method. For all asset types, provide your adjustment data with the adjustmentData property of the content editing output. 5. Use a photo library change block to commit the edit. (For details, see PHPhotoLibrary.) In the block, create a PHAssetChangeRequest object and set its contentEditingOutput property to the editing output that you created. Each 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 objects within the same change block, each with its own corresponding PHContentEditingOutput object. You can also edit assets from photo editing extensions. In this case, instead of working with a PHAsset object, you implement methods in the PHContentEditingController protocol. Photos provides a PHContentEditingOutput object when your extension begins editing. When editing is complete, Photos requests a PHContentEditingOutput object that contains the edited asset content.

## Topics

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

- [init(contentEditingInput:)](photos/phcontenteditingoutput/init(contenteditinginput:).md)

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

- [init(placeholderForCreatedAsset:)](photos/phcontenteditingoutput/init(placeholderforcreatedasset:).md)

### Providing Edit and Adjustment Data

- [adjustmentData](photos/phcontenteditingoutput/adjustmentdata.md)
- [renderedContentURL](photos/phcontenteditingoutput/renderedcontenturl.md)

### Instance Properties

- [defaultRenderedContentType](photos/phcontenteditingoutput/defaultrenderedcontenttype.md)
- [supportedRenderedContentTypes](photos/phcontenteditingoutput/supportedrenderedcontenttypes.md)

### Instance Methods

- [renderedContentURL(for:)](photos/phcontenteditingoutput/renderedcontenturl(for:).md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Editing an Asset

- [Editing Asset Content](photokit/editing-asset-content.md)
- [PHContentEditingInput](photos/phcontenteditinginput.md)
- [PHAdjustmentData](photos/phadjustmentdata.md)
- [PHContentEditingInputRequestOptions](photos/phcontenteditinginputrequestoptions.md)
- [PHLivePhotoEditingContext](photos/phlivephotoeditingcontext.md)
- [PHLivePhotoFrame](photos/phlivephotoframe.md)
- [canPerform(_:)](photos/phasset/canperform(_:).md)
- [PHAssetEditOperation](photos/phasseteditoperation.md)
- [requestContentEditingInput(with:completionHandler:)](photos/phasset/requestcontenteditinginput(with:completionhandler:).md)
- [cancelContentEditingInputRequest(_:)](photos/phasset/cancelcontenteditinginputrequest(_:).md)
- [PHContentEditingInputRequestID](photos/phcontenteditinginputrequestid.md)
- [Editing Request Info Keys](photokit/editing-request-info-keys.md)
