|class||Photos||MBS Mac64bit Plugin||20.2||✅ Yes||❌ No||❌ No||✅ Yes||Desktop & iOS|
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.
- 4 properties
- 9 methods
- method allObjects as Variant()
- method Constructor
- method containsObject(anObject as Variant) as Boolean
- method copy as PHFetchResultMBS
- method countOfAssetsWithMediaType(MediaType as Integer) as Integer
- method indexOfObject(anObject as Variant) as Integer
- method indexOfObject(anObject as Variant, range as NSRangeMBS) as Integer
- method objectAtIndex(index as Integer) as Variant
- method objectsAtIndexes(indexes as NSIndexSetMBS) as Variant()
- shared method available as boolean
- 13 constants
The asset’s photo or video content can be edited.
To begin the process of editing an asset, use the requestContentEditingInputWithOptions method.
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.
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.
The asset is an audio file.
The asset is a photo or other static image.
The asset’s type is unknown.
The asset is a video file.
Asset Playback Styles
The asset should be displayed as a still image.
The asset should be displayed as an animated image.
The asset should be displayed as a Live Photo.
The asset has an unsupported or undefined media playback type.
The asset should be displayed as a video.
The asset should be displayed as a looping video.
This class has no sub classes.
Some methods using this class:
- PHAssetCollectionMBS.fetchAssetCollectionsContainingAsset(asset as PHAssetMBS, type as Integer, options as PHFetchOptionsMBS = nil) as PHFetchResultMBS
- PHAssetCollectionMBS.fetchAssetCollectionsWithLocalIdentifiers(identifiers() as string, options as PHFetchOptionsMBS = nil) as PHFetchResultMBS
- PHAssetCollectionMBS.fetchAssetCollectionsWithType(type as Integer, subType as integer, options as PHFetchOptionsMBS = nil) as PHFetchResultMBS
- PHAssetMBS.fetchAssets(options as PHFetchOptionsMBS = nil) as PHFetchResultMBS
- PHAssetMBS.fetchAssetsInAssetCollection(assetCollection as PHAssetCollectionMBS, options as PHFetchOptionsMBS = nil) as PHFetchResultMBS
- PHAssetMBS.fetchAssetsWithLocalIdentifiers(identifiers() as String, options as PHFetchOptionsMBS = nil) as PHFetchResultMBS
- PHChangeMBS.changeDetailsForFetchResult(FetchResult as PHFetchResultMBS) as PHFetchResultChangeDetailsMBS
- PHCollectionListChangeRequestMBS.changeRequestForCollectionList(collectionList as PHCollectionListMBS, childCollections as PHFetchResultMBS) as PHCollectionListChangeRequestMBS
- PHCollectionListMBS.fetchCollectionListsWithLocalIdentifiers(identifiers() as string, options as PHFetchOptionsMBS = nil) as PHFetchResultMBS
- PHCollectionListMBS.transientCollectionListWithCollectionsFetchResult(fetchResult as PHFetchResultMBS, title as String) as PHCollectionListMBS
Some properties using for this class:
- PHFetchResultChangeDetailsMBS.fetchResultAfterChanges as PHFetchResultMBS
- PHFetchResultChangeDetailsMBS.fetchResultBeforeChanges as PHFetchResultMBS
Some examples using this class:
The items on this page are in the following plugins: MBS Mac64bit Plugin.
MBS FileMaker Plugins