Contents

PHAssetCollection

A representation of a Photos asset grouping, such as a moment, user-created album, or smart album.

Declaration

class PHAssetCollection

Mentioned in

Overview

In the Photos framework, collection objects (including asset collections) do not directly reference their member objects, and there are no other objects that directly reference collection objects. To retrieve the members of an asset collection, fetch them with a PHAsset class method such as fetchAssets(in:options:). To find asset collections, use one of the methods listed in the Fetching Asset Collections group below.

Like assets and collection lists, asset collections are immutable. To create, rename, or delete asset collections, or to add, remove, or rearrange members in an asset collection, create a PHAssetCollectionChangeRequest object within a photo library change block. For details on using change requests and change blocks to update the photo library, see PHPhotoLibrary.

Topics

Fetching Asset Collections

Reading Asset Collection Metadata

Creating Temporary Asset Collections

See Also

Asset retrieval