Platforms to show: All Mac Windows Linux Cross-Platform

PHAssetMBS class

Super class: PHObjectMBS

Type Topic Plugin Version macOS Windows Linux Console & Web iOS
class Photos MBS Mac64bit Plugin 20.2 Yes No No Yes, macOS only No
Function: The class representating of an image, video, or Live Photo in the Photos library.
Notes:
You fetch assets to begin working with them. Use the class methods listed in Fetching Assets to retrieve one or more PHAsset instances representing the assets you want to display or edit.

Assets contain only metadata. The underlying image or video data for any given asset might not be stored on the local device. However, depending on how you plan to use this data, you may not need to download all of it. If you need to populate a collection view with thumbnail images, the Photos framework can manage downloading, generating, and caching thumbnails for each asset. For details, see PHImageManagerMBS.

Asset objects are immutable. To edit an asset’s metadata (such as marking it as a favorite photo), create a PHAssetChangeRequestMBS object within a photo library change block. For more details on using change requests and change blocks to update the photo library, see PHPhotoLibraryMBS.
Subclass of the PHObjectMBS class.

Feedback, Comments & Corrections

Burst Selection Type

Constant Value Description
BurstSelectionTypeAutoPick 1 Photos has automatically identified the asset as a potential user favorite.
BurstSelectionTypeNone 0 The asset is not marked as a favorite member of its burst sequence or is not a member of a burst sequence.
BurstSelectionTypeUserPick 2 The user has marked the asset as a favorite member of its burst sequence.

Edit Operations

Constant Value Description
EditOperationContent 2 The asset’s photo or video content can be edited.
EditOperationDelete 1 The asset can be deleted from the photo library.
EditOperationProperties 3 The asset’s metadata properties can be edited.

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.

Source Types

Constant Value Description
SourceTypeCloudShared 2 The asset originates from an iCloud Shared Album.
Assets from shared albums cannot be edited and do not appear in Moments collections.
SourceTypeiTunesSynced 4 The asset originates from a Mac or PC and is present on the device through iTunes sync.
iTunes-synced assets cannot be edited or deleted.
SourceTypeNone 0 Source information is not available for the asset.
SourceTypeUserLibrary 1 The asset is part of the user’s main Photos library.

The main library contains both assets that originate on the device (such as photos and videos captured with the Camera app or screenshots) and assets synchronized through iCloud Photo Library or My Photo Stream. These assets appear in Moments collections and can be edited or deleted.

Super class PHObjectMBS

This class has no sub classes.

Some methods using this class:

Some properties using for this class:

Some examples which use this class:


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


PHAssetCreationRequestMBS   -   PHAssetResourceCreationOptionsMBS

The biggest plugin in space...




Links
MBS Xojo Plugins