---
title: "init(placeholderForCreatedAsset:)"
framework: photos
role: symbol
role_heading: Initializer
path: "photos/phcontenteditingoutput/init(placeholderforcreatedasset:)"
---

# init(placeholderForCreatedAsset:)

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

## Declaration

```swift
init(placeholderForCreatedAsset: PHObjectPlaceholder)
```

## Parameters

- `placeholderForCreatedAsset`: A placeholder object that ties the editing output to a doc://com.apple.photokit/documentation/Photos/PHAssetChangeRequest object for creating a new asset.

## Return Value

Return Value An initialized content editing output.

## Discussion

Discussion Use this method 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 creates 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. note: If your app edits the contents of assets already in the Photos library — including assets your app has itself recently added — Photos prompts the user for permission to change the asset’s content. If instead your app uses the init(placeholderForCreatedAsset:) method to create an asset with edited content, Photos recognizes your app’s ownership of the content and therefore doesn’t need to prompt the user for permission to edit it.
