Platforms to show: All Mac Windows Linux Cross-Platform
Back to PHAssetMBS class.
PHAssetMBS.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 |
Should return true on MacOS 10.13 or newer.
PHAssetMBS.fetchAssets(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 |
options: Options that specify a filter predicate and sort order for the fetched assets, or nil to use default options. For details, see PHFetchOptionsMBS class.
Returns a fetch result that contains the requested PHAsset objects, or an empty fetch result if no objects match the request.
By default, fetch results do not include photos synced to the device through iTunes or stored in iCloud Shared Albums. To change this behavior, use the includeAssetSourceTypes property in the options parameter.
PHAssetMBS.fetchAssetsInAssetCollection(assetCollection as PHAssetCollectionMBS, 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 |
assetCollection: The asset collection from which to fetch assets.
options: Options that specify a filter predicate and sort order for the fetched assets, or nil to use default options. For details, see PHFetchOptionsMBS class.
Returns a fetch result that contains the requested PHAsset objects, or an empty fetch result if no objects match the request.
By default, the returned PHFetchResultMBS object contains all assets in the specified collection. To retrieve a more specific set of assets, provide a PHFetchOptionsMBS object containing a filter predicate.
Some examples using this method:
PHAssetMBS.fetchAssetsWithBurstIdentifier(burstIdentifier 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 |
burstIdentifier: A burst identifier string, as provided by the burstIdentifier property of an asset.
options: Options that specify a filter predicate and sort order for the fetched assets, or nil to use default options. For details, see PHFetchOptionsMBS.
Returns a fetch result that contains the requested PHAsset objects, or an empty fetch result if no objects match the request.
A burst photo sequence, as seen in the Photos app, corresponds to a group of Photos assets that share the same burstIdentifier string.
By default, the returned PHFetchResultMBS object contains only the representative asset and any user-picked photos from the burst sequence. To retrieve all photos in the burst sequence, provide a PHFetchOptionsMBS object containing a filter predicate.
PHAssetMBS.fetchAssetsWithLocalIdentifiers(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 |
identifiers: An array of strings, each the localIdentifier string of an asset.
options: Options that specify a filter predicate and sort order for the fetched assets, or nil to use default options. For details, see PHFetchOptionsMBS class.
Returns a fetch result that contains the requested PHAsset objects, or an empty fetch result if no objects match the request.
PHAssetMBS.fetchAssetsWithMediaType(mediaType 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 |
mediaType: A media type, such as image or video. See type constants.
options: Options that specify a filter predicate and sort order for the fetched assets, or nil to use default options. For details, see PHFetchOptionsMBS.
Returns a fetch result that contains the requested PHAsset objects, or an empty fetch result if no objects match the request.
By default, the returned PHFetchResultMBS object contains all assets with the specified type. To retrieve a more specific set of assets, provide a PHFetchOptionsMBS object containing a filter predicate.
By default, fetch results do not include photos synced to the device through iTunes or stored in iCloud Shared Albums. To change this behavior, use the includeAssetSourceTypes property in the options parameter.
PHAssetMBS.fetchKeyAssetsInAssetCollection(assetCollection as PHAssetCollectionMBS, 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 |
assetCollection: The asset collection from which to fetch assets.
options: Options that specify a filter predicate and sort order for the fetched assets, or nil to use default options. For details, see PHFetchOptionsMBS class.
Returns a fetch result that contains the requested PHAsset objects, or an empty fetch result or nil if no objects match the request.
Most asset collections contain a key asset, which the Photos app displays as a proxy for the collection. Different types of asset collections have different ways of specifying one or more key assets. For example, in the Camera Roll collection, the most recently captured photo or video is the key asset.
This method returns nil if the assetCollection parameter references a transient asset collection (such as one created with the transientAssetCollectionWithAssets method).
PHAssetMBS.PHContentEditingInputCancelledKey as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Photos | MBS Mac64bit Plugin | 20.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
A Boolean value indicating whether the image request was canceled. (boolean)
If you call the cancelContentEditingInputRequest method to cancel a request, Photos calls your result handler delegate with the value true for this key.
PHAssetMBS.PHContentEditingInputErrorKey as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Photos | MBS Mac64bit Plugin | 20.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
An error that occurred while attempting to load the asset data, NSErrorMBS.
Photos provides an error object for this key if it cannot provide asset data for your handler block’s contentEditingInput parameter. Examine the error object for information about the cause of the error.
PHAssetMBS.PHContentEditingInputResultIsInCloudKey as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Photos | MBS Mac64bit Plugin | 20.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
A Boolean value indicating whether the asset data is stored on the local device or must be downloaded from iCloud.
If true, no asset data was provided because the asset data must be downloaded from iCloud. To do this, submit another request, specifying true for the networkAccessAllowed option.
The items on this page are in the following plugins: MBS Mac64bit Plugin.