Platforms to show: All Mac Windows Linux Cross-Platform

Back to PHCollectionListMBS class.

PHCollectionListMBS.available as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Photos MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Checks whether class is available.

Should return true on MacOS 10.13 or newer.

PHCollectionListMBS.fetchCollectionListsContainingCollection(collection as PHCollectionMBS, options as PHFetchOptionsMBS = nil) as PHFetchResultMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Photos MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Retrieves collection lists that contain the specified collection.

collection: An asset collection or another collection list.
options: Options that specify a filter predicate and sort order for the fetched collection lists, or nil to use default options. For details, see PHFetchOptionsMBS class.

Returns a fetch result that contains the requested PHCollectionList objects, or an empty fetch result if no objects match the request.

Different kinds of collections have different containment possibilities. For example, an asset collection whose type is TypeAlbum may be contained in a folder, or have no containing collection list. A folder, in turn, may be contained in another folder. An asset collection whose type is TypeMoment is always contained by two collection lists: a moment cluster and a moment year.

PHCollectionListMBS.fetchCollectionListsWithLocalIdentifiers(identifiers() as string, options as PHFetchOptionsMBS = nil) as PHFetchResultMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Photos MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Retrieves collection lists with the specified local-device-specific unique identifiers.

identifiers: An array of strings, each the localIdentifier string of a collection list.
options: Options that specify a filter predicate and sort order for the fetched collection lists, or nil to use default options. For details, see PHFetchOptionsMBS.

Returns a fetch result that contains the requested PHCollectionListMBS objects, or an empty fetch result if no objects match the request.

PHCollectionListMBS.fetchCollectionListsWithType(collectionListType as Integer, subtype as Integer, options as PHFetchOptionsMBS = nil) as PHFetchResultMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Photos MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Retrieves collection lists of the specified type.

collectionListType: A type of collection list. See PHCollectionListType.
subtype: A subtype of collection list. See PHCollectionListSubtype.
options: Options that specify a filter predicate and sort order for the fetched collection lists, or nil to use default options. For details, see PHFetchOptionsMBS.

Returns a fetch result that contains the requested PHCollectionListMBS objects, or an empty fetch result if no objects match the request.

By default, the returned PHFetchResult object contains all collection lists with the specified type and subtype. To retrieve a more specific set of collection lists, provide a PHFetchOptionsMBS object containing a filter predicate.

Some examples using this method:

PHCollectionListMBS.transientCollectionListWithCollections(collections() as PHCollectionMBS, title as String) as PHCollectionListMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Photos MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates a temporary collection list that contains the specified asset collections.

collections: An array of PHAssetCollectionMBS objects.
title: A name for the new temporary collection list.

Returns a new collection list.

Transient collection lists are not saved to local storage or iCloud and do not appear in the Photos application or other apps using the Photos framework. A transient collection can be useful if you’ve designed a UI for displaying the contents of a collection list and want to display an arbitrary set of collections.

PHCollectionListMBS.transientCollectionListWithCollectionsFetchResult(fetchResult as PHFetchResultMBS, title as String) as PHCollectionListMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Photos MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates a temporary collection list containing the asset collections in the specified fetch result.

fetchResult: A fetch result that contains one or more PHAssetCollection objects.
title: A name for the new temporary collection list.

Returns a new collection list.

Transient collection lists are not saved to local storage or iCloud and do not appear in the Photos application or other apps using the Photos framework. A transient collection can be useful if you’ve designed a UI for displaying the contents of a collection list and want to display an arbitrary set of collections.

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


The biggest plugin in space...