Platforms to show: All Mac Windows Linux Cross-Platform
Back to PHAssetCreationRequestMBS class.
PHAssetCreationRequestMBS.addResource(type as Integer, data as MemoryBlock, options as PHAssetResourceCreationOptionsMBS = nil)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Photos | MBS Mac64bit Plugin | 20.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
type: The role of this data resource in constructing an asset. For details, see type constants.
data: The data for the asset resource.
options: Options affecting how Photos constructs the asset resource and incorporates its data into the Photos library. For details, see PHAssetResourceCreationOptionsMBS class.
Photos imports the asset resource data only when it executes the PHPhotoLibraryMBS change block in which you create a PHAssetCreationRequest object and call this method. If you attempt to create an asset with invalid data or an invalid combination of resources, Photos reports an error in the completion handler of your PHPhotoLibraryMBS call.
See also:
PHAssetCreationRequestMBS.addResource(type as Integer, data as String, options as PHAssetResourceCreationOptionsMBS = nil)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Photos | MBS Mac64bit Plugin | 20.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
type: The role of this data resource in constructing an asset. For details, see type constants.
data: The data for the asset resource.
options: Options affecting how Photos constructs the asset resource and incorporates its data into the Photos library. For details, see PHAssetResourceCreationOptionsMBS class.
Photos imports the asset resource data only when it executes the PHPhotoLibraryMBS change block in which you create a PHAssetCreationRequest object and call this method. If you attempt to create an asset with invalid data or an invalid combination of resources, Photos reports an error in the completion handler of your PHPhotoLibraryMBS call.
See also:
PHAssetCreationRequestMBS.addResource(type as Integer, file as FolderItem, options as PHAssetResourceCreationOptionsMBS = nil)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Photos | MBS Mac64bit Plugin | 20.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
type: The role of this data resource in constructing an asset. For details, see type constants.
file: The URL to a local file containing data for the asset resource.
options: Options affecting how Photos constructs the asset resource and incorporates its data into the Photos library. For details, see PHAssetResourceCreationOptionsMBS.
Photos imports the asset resource data only when it executes the PHPhotoLibrary change block in which you create a PHAssetCreationRequestMBS object and call this method. If you attempt to create an asset with invalid data or an invalid combination of resources, Photos reports an error in the completion handler of your PHPhotoLibraryMBS call.
See also:
PHAssetCreationRequestMBS.Constructor Private
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Photos | MBS Mac64bit Plugin | 20.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
The items on this page are in the following plugins: MBS Mac64bit Plugin.