Type Method

creationRequestForAsset

Creates a request for adding a new asset to the Photos library using asset resources.

Declaration

+ (instancetype)creationRequestForAsset;

Return Value

An asset creation request.

Discussion

Call this method within a photo library change block to create a new asset. For details on change blocks, see PHPhotoLibrary. After calling this method, and before returning from the change block use the methods listed in Providing Data Resources for the New Asset to specify one or more data resources for the asset.

To set metadata properties of the newly created asset, use the corresponding properties of the change request (provided by the superclass PHAssetChangeRequest and listed in Modifying Assets). To reference the newly created asset later in the same change block or after the change block completes, use the placeholderForCreatedAsset property to retrieve a placeholder object.