Platforms to show: All Mac Windows Linux Cross-Platform

PHFetchResultMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Photos MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Function: An ordered list of assets or collections returned from a Photos fetch method.
When you use class methods on the PHAssetMBS, PHCollectionMBS, PHAssetCollectionMBS, and PHCollectionListMBS classes to retrieve objects, Photos provides the resulting objects in a fetch result. You access the contents of a fetch result with various methods. Unlike an array, however, a PHFetchResult object dynamically loads its contents from the Photos library as needed, providing optimal performance even when handling a large number of results.

A fetch result provides thread-safe access to its contents. After a fetch, the fetch result’s count value is constant, and all objects in the fetch result keep the same localIdentifier value. (To get updated content for a fetch, register a change observer with the shared PHPhotoLibraryMBS object.)

A fetch result caches its contents, keeping a batch of objects around the most recently accessed index. Because objects outside of the batch are no longer cached, accessing these objects results in refetching those objects. This process can result in changes to values previously read from those objects.

Feedback, Comments & Corrections

Edit Operation

Constant Value Description
EditOperationContent 2 The asset’s photo or video content can be edited.
To begin the process of editing an asset, use the requestContentEditingInputWithOptions method.
EditOperationDelete 1 The asset can be deleted from the photo library.
To delete one or more assets, create a change request with the deleteAssets method inside a PHPhotoLibrary change block.
EditOperationProperties 3 The asset’s metadata properties can be edited.
To change an asset’s properties, create a change request with the changeRequestForAsset method inside a PHPhotoLibraryMBS change block.

Media Types

Constant Value Description
MediaTypeAudio 3 The asset is an audio file.
MediaTypeImage 1 The asset is a photo or other static image.
MediaTypeUnknown 0 The asset’s type is unknown.
MediaTypeVideo 2 The asset is a video file.

Asset Playback Styles

Constant Value Description
PlaybackStyleImage 1 The asset should be displayed as a still image.
PlaybackStyleImageAnimated 2 The asset should be displayed as an animated image.
PlaybackStyleLivePhoto 3 The asset should be displayed as a Live Photo.
PlaybackStyleUnsupported 0 The asset has an unsupported or undefined media playback type.
PlaybackStyleVideo 4 The asset should be displayed as a video.
PlaybackStyleVideoLooping 5 The asset should be displayed as a looping video.

This class has no sub classes.

Some methods using this class:

Some properties using for this class:

Some examples using this class:

Blog Entries

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

PHFetchResultChangeDetailsMBS   -   PhidgetAccelerometerMBS

The biggest plugin in space...

MBS FileMaker Plugins

Start Chat