Platforms to show: All Mac Windows Linux Cross-Platform

PHFetchOptionsMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Photos MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
A set of options that affect the filtering, sorting, and management of results that Photos returns when you fetch asset or collection objects.

Using class methods on the PHAssetMBS, PHCollectionMBS, PHAssetCollectionMBS, and PHCollectionListMBS classes to fetch assets or collections produces a PHFetchResultMBS 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 and sortDescriptors properties. The set of available keys depends on which class you’re using to fetch assets or collections—see Table 1 for the list of keys supported by each class.

Supported predicate and sort descriptor keys

Class for Fetch MethodSupported Keys
PHAssetSELF, localIdentifier, creationDate, modificationDate, mediaType, mediaSubtypes, duration, pixelWidth, pixelHeight, favorite (or isFavorite), hidden (or isHidden), burstIdentifier
PHAssetCollectionSELF, localIdentifier, localizedTitle (or title), startDate, endDate, estimatedAssetCount
PHCollectionListSELF, localIdentifier, localizedTitle (or title), startDate, endDate
PHCollection (can fetch a mix of PHCollectionList and PHAssetCollection objects)SELF, localIdentifier, localizedTitle (or title), startDate, endDate

Available in MacOS 10.13 or newer.

This class has no sub classes.

Some methods using this class:


The items on this page are in the following plugins: MBS Mac64bit Plugin.


PHContentEditingOutputMBS   -   PHFetchResultChangeDetailsMBS


The biggest plugin in space...