---
title: PHCollection
framework: photos
role: symbol
role_heading: Class
path: photos/phcollection
---

# PHCollection

The abstract superclass for Photos asset collections and collection lists.

## Declaration

```swift
class PHCollection
```

## Overview

Overview You do not create or work with instances of this class directly. Instead, use one of its two concrete subclasses, PHAssetCollection or PHCollectionList. A PHAssetCollection object represents a collection of photo or video assets, such as an album, moment, or Shared Photo Stream. A 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 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 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

- [fetchCollections(in:options:)](photos/phcollection/fetchcollections(in:options:).md)
- [fetchTopLevelUserCollections(with:)](photos/phcollection/fetchtoplevelusercollections(with:).md)

### Reading Collection Metadata

- [localizedTitle](photos/phcollection/localizedtitle.md)

### Determining Collection Capabilities

- [canContainAssets](photos/phcollection/cancontainassets.md)
- [canContainCollections](photos/phcollection/cancontaincollections.md)
- [canPerform(_:)](photos/phcollection/canperform(_:).md)
- [PHCollectionEditOperation](photos/phcollectioneditoperation.md)

### Instance Properties

- [modificationDate](photos/phcollection/modificationdate.md)

## Relationships

### Inherits From

- [PHObject](photos/phobject.md)

### Inherited By

- [PHAssetCollection](photos/phassetcollection.md)
- [PHCollectionList](photos/phcollectionlist.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Asset retrieval

- [Fetching Objects and Requesting Changes](photokit/fetching-objects-and-requesting-changes.md)
- [PHAsset](photos/phasset.md)
- [PHAssetCollection](photos/phassetcollection.md)
- [PHCollectionList](photos/phcollectionlist.md)
- [PHObject](photos/phobject.md)
- [PHFetchResult](photos/phfetchresult.md)
- [PHFetchOptions](photos/phfetchoptions.md)
