<!--
{
  "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/PHFetchOptions",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Photos"
    ],
    "preciseIdentifier" : "c:objc(cs)PHFetchOptions"
  },
  "title" : "PHFetchOptions"
}
-->

# PHFetchOptions

A set of options that affect the filtering, sorting, and management of results that Photos returns when you fetch asset or collection objects.

```
class PHFetchOptions
```

## Overview

Using class methods on the [`PHAsset`](/documentation/Photos/PHAsset), [`PHCollection`](/documentation/Photos/PHCollection), [`PHAssetCollection`](/documentation/Photos/PHAssetCollection), and [`PHCollectionList`](/documentation/Photos/PHCollectionList) classes to fetch assets or collections produces a [`PHFetchResult`](/documentation/Photos/PHFetchResult) object containing the requested objects. The options you specify control which objects the fetch result includes, how those objects are arranged in the fetch result, and how Photos should notify your app of changes to the fetch result.

Photos supports only a restricted set of keys for the [`predicate`](/documentation/Photos/PHFetchOptions/predicate) and [`sortDescriptors`](/documentation/Photos/PHFetchOptions/sortDescriptors) properties. The set of available keys depends on which class you’re using to fetch assets or collections. The following table lists the keys supported by each class:

|Class for Fetch Method                                                                                                                                                                                                                |Supported Keys                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|``doc://com.apple.photokit/documentation/Photos/PHAsset``                                                                                                                                                                             |`SELF`, ``doc://com.apple.photokit/documentation/Photos/PHObject/localIdentifier``, ``doc://com.apple.photokit/documentation/Photos/PHAsset/creationDate``, ``doc://com.apple.photokit/documentation/Photos/PHAsset/modificationDate``, ``doc://com.apple.photokit/documentation/Photos/PHAsset/mediaType``, ``doc://com.apple.photokit/documentation/Photos/PHAsset/mediaSubtypes``, ``doc://com.apple.photokit/documentation/Photos/PHAsset/duration``, ``doc://com.apple.photokit/documentation/Photos/PHAsset/pixelWidth``, ``doc://com.apple.photokit/documentation/Photos/PHAsset/pixelHeight``, ``doc://com.apple.photokit/documentation/Photos/PHAsset/isFavorite`` (or `isFavorite`), ``doc://com.apple.photokit/documentation/Photos/PHAsset/isHidden`` (or `isHidden`), ``doc://com.apple.photokit/documentation/Photos/PHAsset/burstIdentifier``|
|``doc://com.apple.photokit/documentation/Photos/PHAssetCollection``                                                                                                                                                                   |`SELF`, ``doc://com.apple.photokit/documentation/Photos/PHObject/localIdentifier``, ``doc://com.apple.photokit/documentation/Photos/PHCollection/localizedTitle`` (or `title`), ``doc://com.apple.photokit/documentation/Photos/PHAssetCollection/startDate``, ``doc://com.apple.photokit/documentation/Photos/PHAssetCollection/endDate``, ``doc://com.apple.photokit/documentation/Photos/PHAssetCollection/estimatedAssetCount``                                                                                                                                                                                                                                                                                                                                                                                                                         |
|``doc://com.apple.photokit/documentation/Photos/PHCollectionList``                                                                                                                                                                    |`SELF`, ``doc://com.apple.photokit/documentation/Photos/PHObject/localIdentifier``, ``doc://com.apple.photokit/documentation/Photos/PHCollection/localizedTitle`` (or `title`), ``doc://com.apple.photokit/documentation/Photos/PHCollectionList/startDate``, ``doc://com.apple.photokit/documentation/Photos/PHCollectionList/endDate``                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
|``doc://com.apple.photokit/documentation/Photos/PHCollection`` (can fetch a mix of ``doc://com.apple.photokit/documentation/Photos/PHCollectionList`` and ``doc://com.apple.photokit/documentation/Photos/PHAssetCollection`` objects)|`SELF`, ``doc://com.apple.photokit/documentation/Photos/PHObject/localIdentifier``, ``doc://com.apple.photokit/documentation/Photos/PHCollection/localizedTitle`` (or `title`), ``doc://com.apple.photokit/documentation/Photos/PHCollectionList/startDate``, ``doc://com.apple.photokit/documentation/Photos/PHCollectionList/endDate``                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |

## Topics

### Sorting and Filtering Fetch Results

[`var predicate: NSPredicate?`](/documentation/Photos/PHFetchOptions/predicate)

A predicate that specifies which properties to select results by and that also specifies any constraints on selection.

[`var sortDescriptors: [NSSortDescriptor]?`](/documentation/Photos/PHFetchOptions/sortDescriptors)

A list of sort descriptors, specifying an order for the fetched objects.

### Subscribing to Changes

[`var wantsIncrementalChangeDetails: Bool`](/documentation/Photos/PHFetchOptions/wantsIncrementalChangeDetails)

A Boolean value that determines whether your app receives detailed change information for the objects in the fetch result.

### Limiting Fetch Results

[`var fetchLimit: Int`](/documentation/Photos/PHFetchOptions/fetchLimit)

The maximum number of objects to include in the fetch result.

[`var includeAllBurstAssets: Bool`](/documentation/Photos/PHFetchOptions/includeAllBurstAssets)

A Boolean value that determines whether the fetch result includes all assets from burst photo sequences.

[`var includeHiddenAssets: Bool`](/documentation/Photos/PHFetchOptions/includeHiddenAssets)

A Boolean value that determines whether the fetch result includes assets marked as hidden.

[`var includeAssetSourceTypes: PHAssetSourceType`](/documentation/Photos/PHFetchOptions/includeAssetSourceTypes)

The set of source types for which to include assets in the fetch result.

[`var prefetchAssetExtendedMetadata: Bool`](/documentation/Photos/PHFetchOptions/prefetchAssetExtendedMetadata)

A Boolean value to fetch `PHAssetExtendedMetadata` when the asset is also fetched.

## Relationships

### Conforms To

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

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

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

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

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

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

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

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)