Creates an editing output for use in adding a new asset to the photo library.
Mac Catalyst 13.0+Beta
A placeholder object that ties the editing output to a PHAssetChangeRequest object for creating a new asset.
An initialized content editing output.
Use this method if you want to add a new asset to the Photos library with edited content, as opposed to editing the content of an asset after adding it to the library. For example, you might use this option if your app applies filters to photos it captures with the device camera—instead of saving only the filtered image to the Photos library, your app can save both the filtered and the original image, allowing the user to revert to the original image or apply different filters later. The code below illustrates such a workflow:
In this example, the app first uses a PHAssetChangeRequest object to request creation of a new asset with the unedited image captured from the camera (originalJPEGFileURL). Then, it create a PHContentEditingOutput object with the placeholderForCreatedAsset object provided by the change request. Finally, it provides filtered image data (adjustedJPEGData) and adjustment data describing the filters (adjustmentData) to the editing output and adds the editing output to the change request.
This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.