Platforms to show: All Mac Windows Linux Cross-Platform

PHAssetMBS class

Super class: PHObjectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Photos MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The class representating of an image, video, or Live Photo in the Photos library.

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.
This is an abstract class. You can't create an instance, but you can get one from various plugin functions.

Constants

Constant Value Description
MediaSubtypeNone 0 One of the constants identifying specific variations of asset media, such as panorama or screenshot photos and time lapse or high frame rate video. The asset has no subtype.
This is the default subtype for most photo and video assets.
MediaSubtypePhotoDepthEffect 16 One of the constants identifying specific variations of asset media, such as panorama or screenshot photos and time lapse or high frame rate video. The asset is a photo captured with the Camera app's Portrait mode depth effect.
MediaSubtypePhotoHDR 2 One of the constants identifying specific variations of asset media, such as panorama or screenshot photos and time lapse or high frame rate video. The asset is a High Dynamic Range photo.
MediaSubtypePhotoLive 8 One of the constants identifying specific variations of asset media, such as panorama or screenshot photos and time lapse or high frame rate video. The asset is a Live Photo that includes movement and sounds from the moments just before and after its capture. more
MediaSubtypePhotoPanorama 1 One of the constants identifying specific variations of asset media, such as panorama or screenshot photos and time lapse or high frame rate video. The asset is a large-format panorama photo.
MediaSubtypePhotoScreenshot 4 One of the constants identifying specific variations of asset media, such as panorama or screenshot photos and time lapse or high frame rate video. The asset is an image captured with the device’s screenshot feature.
MediaSubtypeVideoHighFrameRate &h20000 One of the constants identifying specific variations of asset media, such as panorama or screenshot photos and time lapse or high frame rate video. The asset is a high-frame-rate video.
High-frame-rate videos are created by the Slow-Mo feature in the Camera app on an iOS device.
MediaSubtypeVideoStreamed &h10000 One of the constants identifying specific variations of asset media, such as panorama or screenshot photos and time lapse or high frame rate video. The asset is a video whose contents are always streamed over a network connection. more
MediaSubtypeVideoTimelapse &h40000 One of the constants identifying specific variations of asset media, such as panorama or screenshot photos and time lapse or high frame rate video. The asset is a time-lapse video.

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. more

Super class PHObjectMBS

This class has no sub classes.

Some methods using this class:

Some properties using for this class:

Some examples using this class:

Blog Entries


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


PHAssetCreationRequestMBS   -   PHAssetResourceCreationOptionsMBS


The biggest plugin in space...