<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PhotoKit",
  "identifier" : "/documentation/Photos/PHAssetCollectionChangeRequest",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Photos"
    ],
    "preciseIdentifier" : "c:objc(cs)PHAssetCollectionChangeRequest"
  },
  "title" : "PHAssetCollectionChangeRequest"
}
-->

# PHAssetCollectionChangeRequest

A request to create, delete, or modify a Photos asset collection, for use in a photo library change block.

```
class PHAssetCollectionChangeRequest
```

## Overview

You use the [`PHAssetCollectionChangeRequest`](/documentation/Photos/PHAssetCollectionChangeRequest) class to request changes for [`PHAssetCollection`](/documentation/Photos/PHAssetCollection) objects. To make changes to asset collections (such as user-created albums) in the Photos library, create a change request using the appropriate class method for the change you want to perform.

- Call the [`creationRequestForAssetCollection(withTitle:)`](/documentation/Photos/PHAssetCollectionChangeRequest/creationRequestForAssetCollection(withTitle:)) method to create a new asset collection.
- Call the [`deleteAssetCollections(_:)`](/documentation/Photos/PHAssetCollectionChangeRequest/deleteAssetCollections(_:)) method to delete existing asset collections.
- Call the [`init(for:)`](/documentation/Photos/PHAssetCollectionChangeRequest/init(for:)) or [`init(for:assets:)`](/documentation/Photos/PHAssetCollectionChangeRequest/init(for:assets:)) method to modify a collection’s metadata or list of member assets.

Before creating a change request, use the [`canPerform(_:)`](/documentation/Photos/PHCollection/canPerform(_:)) method to verify that the collection allows the edit operation you’re requesting. If you attempt to perform an unsupported edit operation, Photos throws an exception.

A change request for creating or modifying an asset collection works like a mutable version of the asset collection object. Use the change request’s properties and instance methods to request changes to the asset collection itself. For example, the following code removes an asset from an album.

```swift
PHPhotoLibrary.shared().performChanges {

    let request = PHAssetCollectionChangeRequest(for: myAlbum,
                                                 assets: albumAssetsFetchResult)
    
    request!.removeAssets([asset] as NSFastEnumeration)

} completionHandler: { success, error in
    print("Finished removing the asset from the album. \(success ? "Success" : String(describing: error))")
}
```

After Photos runs the change block and calls your completion handler, the asset collection’s state reflects the changes you requested in the block.

If you create or use a change request object outside a photo library change block, Photos raises an Objective-C exception. For details on change blocks, see [`PHPhotoLibrary`](/documentation/Photos/PHPhotoLibrary).

## Topics

### Adding New Asset Collections

[`creationRequestForAssetCollection(withTitle:)`](/documentation/Photos/PHAssetCollectionChangeRequest/creationRequestForAssetCollection(withTitle:))

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

[`placeholderForCreatedAssetCollection`](/documentation/Photos/PHAssetCollectionChangeRequest/placeholderForCreatedAssetCollection)

A placeholder object for the asset collection that the change request creates.

### Deleting Asset Collections

[`deleteAssetCollections(_:)`](/documentation/Photos/PHAssetCollectionChangeRequest/deleteAssetCollections(_:))

Requests that the specified asset collections be deleted.

### Modifying Asset Collections

[`init(for:)`](/documentation/Photos/PHAssetCollectionChangeRequest/init(for:))

Creates a request for modifying the specified asset collection.

[`init(for:assets:)`](/documentation/Photos/PHAssetCollectionChangeRequest/init(for:assets:))

Creates a request for modifying the specified asset collection, with a fetch result for tracking changes.

[`title`](/documentation/Photos/PHAssetCollectionChangeRequest/title)

The displayed name of the asset collection.

[`addAssets(_:)`](/documentation/Photos/PHAssetCollectionChangeRequest/addAssets(_:))

Adds the specified assets to the asset collection.

[`insertAssets(_:at:)`](/documentation/Photos/PHAssetCollectionChangeRequest/insertAssets(_:at:))

Inserts the specified assets into the collection at the specified indexes.

[`removeAssets(_:)`](/documentation/Photos/PHAssetCollectionChangeRequest/removeAssets(_:))

Removes the specified assets from the asset collection.

[`removeAssets(at:)`](/documentation/Photos/PHAssetCollectionChangeRequest/removeAssets(at:))

Removes the assets at the specified indexes from the asset collection.

[`replaceAssets(at:withAssets:)`](/documentation/Photos/PHAssetCollectionChangeRequest/replaceAssets(at:withAssets:))

Replaces the assets at the specified indexes in the asset collection with the specified assets.

[`moveAssets(at:to:)`](/documentation/Photos/PHAssetCollectionChangeRequest/moveAssets(at:to:))

Moves the assets at the specified indexes in the asset collection to a new index.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)