Platforms to show: All Mac Windows Linux Cross-Platform
Back to PHAssetChangeRequestMBS class.
PHAssetChangeRequestMBS.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.15 or newer.
PHAssetChangeRequestMBS.changeRequestForAsset(asset as PHAssetMBS) as PHAssetChangeRequestMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Photos | MBS Mac64bit Plugin | 20.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
asset: The asset to be modified.
Returns an asset change request.
Before editing an asset, use its canPerformEditOperation method to see if the asset allows editing.
After you create a change request within a photo library change block, propose changes to the original asset’s properties by setting the corresponding properties of the change request. After Photos runs your change block, the asset’s properties reflect your changes. For details on change blocks, see PHPhotoLibraryMBS.
To edit an asset’s image or video content, first begin a content editing session with the asset’s requestContentEditingInputWithOptions method. You commit a content edit by setting the contentEditingOutput property of a change request within a change block. For more information about asset content editing, see PHAssetMBS.
PHAssetChangeRequestMBS.creationRequestForAssetFromImage(image as NSImageMBS) as PHAssetChangeRequestMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Photos | MBS Mac64bit Plugin | 20.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
image: An image.
Returns an asset creation request.
Call this method within a photo library change block to create a new asset. For details on change blocks, see PHPhotoLibraryMBS.
To reference the newly created asset later in the same change block or after the change block completes, use the placeholderForCreatedAsset property to retrieve a placeholder object.
PHAssetChangeRequestMBS.creationRequestForAssetFromImageAtFile(file as FolderItem) as PHAssetChangeRequestMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Photos | MBS Mac64bit Plugin | 20.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
file: A URL for an image file.
Returns an asset creation request.
Call this method within a photo library change block to create a new asset. For details on change blocks, see PHPhotoLibraryMBS.
To set metadata properties of the newly created asset, use the corresponding properties of the change request (listed in Modifying Assets). To reference the newly created asset later in the same change block or after the change block completes, use the placeholderForCreatedAsset property to retrieve a placeholder object.
PHAssetChangeRequestMBS.creationRequestForAssetFromVideoAtFileURL(file as FolderItem) as PHAssetChangeRequestMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Photos | MBS Mac64bit Plugin | 20.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
file: A folderitem for a video file.
Returns an asset creation request.
Call this method within a photo library change block to create a new asset. For details on change blocks, see PHPhotoLibraryMBS.
To set metadata properties of the newly created asset, use the corresponding properties of the change request (listed in Modifying Assets). To reference the newly created asset later in the same change block or after the change block completes, use the placeholderForCreatedAsset property to retrieve a placeholder object.
PHAssetChangeRequestMBS.deleteAssets(assets() as PHAssetMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Photos | MBS Mac64bit Plugin | 20.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
assets: An array of PHAssetMBS objects to be deleted.
Call this method within a photo library change block to delete assets. For details on change blocks, see PHPhotoLibraryMBS.
The items on this page are in the following plugins: MBS Mac64bit Plugin.