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|
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.
- 15 properties
- property burstIdentifier as String
- property burstSelectionTypes as Integer
- property creationDate as Date
- property duration as Double
- property Favorite as Boolean
- property Hidden as Boolean
- property location as Variant
- property mediaSubtypes as Integer
- property mediaType as Integer
- property modificationDate as Date
- property pixelHeight as Integer
- property pixelWidth as Integer
- property playbackStyle as Integer
- property RepresentsBurst as Boolean
- property sourceType as Integer
- 4 methods
- method cancelContentEditingInputRequest(requestID as Integer)
- method canPerformEditOperation(editOperation as Integer) as Boolean
- method Constructor
- method requestContentEditingInputWithOptions(options as PHContentEditingInputRequestOptionsMBS, CompletionDelegate as RequestContentEditingInputWithOptionsCompletedMBS, tag as variant = nil) as Integer
- 10 shared methods
- shared method available as boolean
- shared method fetchAssets(options as PHFetchOptionsMBS = nil) as PHFetchResultMBS
- shared method fetchAssetsInAssetCollection(assetCollection as PHAssetCollectionMBS, options as PHFetchOptionsMBS = nil) as PHFetchResultMBS
- shared method fetchAssetsWithBurstIdentifier(burstIdentifier as String, options as PHFetchOptionsMBS = nil) as PHFetchResultMBS
- shared method fetchAssetsWithLocalIdentifiers(identifiers() as String, options as PHFetchOptionsMBS = nil) as PHFetchResultMBS
- shared method fetchAssetsWithMediaType(mediaType as Integer, options as PHFetchOptionsMBS = nil) as PHFetchResultMBS
- shared method fetchKeyAssetsInAssetCollection(assetCollection as PHAssetCollectionMBS, options as PHFetchOptionsMBS = nil) as PHFetchResultMBS
- shared method PHContentEditingInputCancelledKey as String
- shared method PHContentEditingInputErrorKey as String
- shared method PHContentEditingInputResultIsInCloudKey as String
- delegate RequestContentEditingInputWithOptionsCompletedMBS(Asset as PHAssetMBS, Options as PHContentEditingInputRequestOptionsMBS, tag as variant, contentEditingInput as PHContentEditingInputMBS, info as Dictionary)
- 29 constants
- const MediaSubtypeNone = 0
- const MediaSubtypePhotoDepthEffect = 16
- const MediaSubtypePhotoHDR = 2
- const MediaSubtypePhotoLive = 8
- const MediaSubtypePhotoPanorama = 1
- const MediaSubtypePhotoScreenshot = 4
- const MediaSubtypeVideoHighFrameRate = &h20000
- const MediaSubtypeVideoStreamed = &h10000
- const MediaSubtypeVideoTimelapse = &h40000
Burst Selection Type
Photos has automatically identified the asset as a potential user favorite.
The asset is not marked as a favorite member of its burst sequence or is not a member of a burst sequence.
The user has marked the asset as a favorite member of its burst sequence.
The asset’s photo or video content can be edited.
The asset can be deleted from the photo library.
The asset’s metadata properties can be edited.
The asset is an audio file.
The asset is a photo or other static image.
The asset’s type is unknown.
The asset is a video file.
Asset Playback Styles
The asset should be displayed as a still image.
The asset should be displayed as an animated image.
The asset should be displayed as a Live Photo.
The asset has an unsupported or undefined media playback type.
The asset should be displayed as a video.
The asset should be displayed as a looping video.
The asset originates from an iCloud Shared Album.
Assets from shared albums cannot be edited and do not appear in Moments collections.
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.
Source information is not available for the asset.
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
- 2 properties
- 2 methods
- shared method available as boolean
This class has no sub classes.
Some methods using this class:
- PHAssetChangeRequestMBS.changeRequestForAsset(asset as PHAssetMBS) as PHAssetChangeRequestMBS
- PHAssetChangeRequestMBS.deleteAssets(assets() as PHAssetMBS)
- PHAssetCollectionChangeRequestMBS.addAsset(asset as PHAssetMBS)
- PHAssetCollectionChangeRequestMBS.addAssets(assets() as PHAssetMBS)
- PHAssetCollectionChangeRequestMBS.insertAsset(asset as PHAssetMBS, index as Integer)
- PHAssetCollectionChangeRequestMBS.insertAssets(assets() as PHAssetMBS, indexes as NSIndexSetMBS)
- PHAssetCollectionChangeRequestMBS.removeAsset(asset as PHAssetMBS)
- PHAssetCollectionChangeRequestMBS.removeAssets(assets() as PHAssetMBS)
- PHAssetCollectionChangeRequestMBS.replaceAsset(AtIndex as Integer, asset as PHAssetMBS)
- PHAssetCollectionChangeRequestMBS.replaceAssets(AtIndexes as NSIndexSetMBS, assets() as PHAssetMBS)
- PHAssetCollectionMBS.fetchAssetCollectionsContainingAsset(asset as PHAssetMBS, type as Integer, options as PHFetchOptionsMBS = nil) as PHFetchResultMBS
- PHAssetCollectionMBS.transientAssetCollectionWithAssetFetchResult(fetchResult as PHAssetMBS, title as string) as PHAssetCollectionMBS
- PHAssetCollectionMBS.transientAssetCollectionWithAssets(assets() as PHAssetMBS, title as string) as PHAssetCollectionMBS
- PHAssetResourceMBS.assetResourcesForAsset(asset as PHAssetMBS) as PHAssetResourceMBS()
- PHCachingImageManagerMBS.startCachingImagesForAssets(assets() as PHAssetMBS, targetSize as CGSizeMBS, contentMode as Integer, options as PHImageRequestOptionsMBS = nil)
- PHCachingImageManagerMBS.stopCachingImagesForAssets(assets() as PHAssetMBS, targetSize as CGSizeMBS, contentMode as Integer, options as PHImageRequestOptionsMBS = nil)
- PHImageManagerMBS.RequestAVAssetForVideo(asset as PHAssetMBS, options as PHVideoRequestOptionsMBS, exportPreset as String, CompletionHandler as RequestAVAssetForVideoCompletedMBS, tag as Variant = nil) as Integer
- PHImageManagerMBS.RequestExportSessionForVideo(asset as PHAssetMBS, options as PHVideoRequestOptionsMBS, exportPreset as String, CompletionHandler as RequestExportSessionForVideoCompletedMBS, tag as Variant = nil) as Integer
- PHImageManagerMBS.RequestImageDataAndOrientationForAsset(asset as PHAssetMBS, options as PHImageRequestOptionsMBS, CompletionHandler as RequestImageForAssetCompletedMBS, tag as Variant = nil) as Integer
- PHImageManagerMBS.RequestImageForAsset(asset as PHAssetMBS, targetSize as CGSizeMBS, contentMode as Integer, options as PHImageRequestOptionsMBS, CompletionHandler as RequestImageForAssetCompletedMBS, tag as Variant = nil) as Integer
- PHImageManagerMBS.RequestImageForAssetSync(asset as PHAssetMBS, targetSize as CGSizeMBS, contentMode as Integer, options as PHImageRequestOptionsMBS, byref Info as Dictionary) as NSImageMBS
Some properties using for this class:
- PHProjectChangeRequestMBS.keyAsset as PHAssetMBS
Some examples which use this class:
The items on this page are in the following plugins: MBS Mac64bit Plugin.
MBS Xojo Plugins