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

# PHCollection

The abstract superclass for Photos asset collections and collection lists.

```
class PHCollection
```

## Overview

You do not create or work with instances of this class directly. Instead, use one of its two concrete subclasses, [`PHAssetCollection`](/documentation/Photos/PHAssetCollection) or [`PHCollectionList`](/documentation/Photos/PHCollectionList).

- A [`PHAssetCollection`](/documentation/Photos/PHAssetCollection) object represents a collection of photo or video assets, such as an album, moment, or Shared Photo Stream.
- A [`PHCollectionList`](/documentation/Photos/PHCollectionList) object represents a collection that contains other collections, such as a a folder containing albums or the set of all moments in a calendar year.

> Important:
> Accessing or modifying the Photos library requires explicit authorization from the user. The first time you call one of the methods listed in the Fetching Collections group, Photos automatically prompts the user for authorization. (Alternatively, you can use the ``doc://com.apple.photokit/documentation/Photos/PHPhotoLibrary`` ``doc://com.apple.photokit/documentation/Photos/PHPhotoLibrary/requestAuthorization(_:)`` method to prompt the user at a time of your choosing.)
> 
> Your app’s `Info.plist` file must provide a value for the [NSPhotoLibraryUsageDescription](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW17) key that explains to the user why your app is requesting Photos access. Apps linked on or after iOS 10.0 will crash if this key is not present.

## Topics

### Fetching Collections

[`+  fetchCollectionsInCollectionList:options:`](/documentation/Photos/PHCollection/fetchCollections(in:options:))

Retrieves collections from the specified collection list.

[`+  fetchTopLevelUserCollectionsWithOptions:`](/documentation/Photos/PHCollection/fetchTopLevelUserCollections(with:))

Retrieves collections from the root of the photo library’s hierarchy of user-created albums and folders.

### Reading Collection Metadata

[`localizedTitle`](/documentation/Photos/PHCollection/localizedTitle)

The localized name of the collection.

### Determining Collection Capabilities

[`canContainAssets`](/documentation/Photos/PHCollection/canContainAssets)

A Boolean value indicating whether the collection can contain assets.

[`canContainCollections`](/documentation/Photos/PHCollection/canContainCollections)

A Boolean value indicating whether the collection can contain other collections.

[`-  canPerformEditOperation:`](/documentation/Photos/PHCollection/canPerform(_:))

Returns whether the collection supports the specified editing operation.

[`PHCollectionEditOperation`](/documentation/Photos/PHCollectionEditOperation)

Values identifying possible actions that a collection can support, used by the [`canPerform(_:)`](/documentation/Photos/PHCollection/canPerform(_:)) method.

## Relationships

### Conforms To

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Equatable`](/documentation/Swift/Equatable)

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Hashable`](/documentation/Swift/Hashable)

[`CVarArg`](/documentation/Swift/CVarArg)

[`NSCopying`](/documentation/Foundation/NSCopying)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

### Inherits From

[`PHObject`](/documentation/Photos/PHObject)

### Inherited By

[`PHCollectionList`](/documentation/Photos/PHCollectionList)

[`PHAssetCollection`](/documentation/Photos/PHAssetCollection)

---

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)