Platforms to show: All Mac Windows Linux Cross-Platform

PHContentEditingOutputMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Photos MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
A container to which you provide the results of editing the photo, video, or Live Photo content of a Photos asset.

To edit an asset’s photo or video content:

1. Fetch a PHAssetMBS object that represents the photo or video to be edited.
2. Call the asset’s requestContentEditingInputWithOptions method to retrieve a PHContentEditingInputMBS 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 PHAdjustmentDataMBS object describing the changes.
4. 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 saveLivePhotoToOutput 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 PHPhotoLibraryMBS.) In the block, create a PHAssetChangeRequestMBS object and set its contentEditingOutput property to the editing output that you created.
Each PHPhotoLibraryperformChanges 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 PHAssetMBS object, you implement methods in the PHContentEditingController protocol. Photos provides a PHContentEditingOutputMBS object when your extension begins editing. When editing is complete, Photos requests a PHContentEditingOutputMBS object that contains the edited asset content.

Requires MacOS 10.11 or newer.

This class has no sub classes.

Some methods using this class:

Some properties using for this class:


The items on this page are in the following plugins: MBS Mac64bit Plugin.


PHContentEditingInputRequestOptionsMBS   -   PHFetchOptionsMBS


The biggest plugin in space...