assetResources(for:)
Returns the list of data resources associated with an asset.
Declaration
class func assetResources(for asset: PHAsset) -> [PHAssetResource]Parameters
- asset:
A photo or video asset in the Photos library.
Return Value
The asset’s resources.
Discussion
Asset resource objects describe the data files that an asset represents. An asset can contain multiple resources—for example, an edited photo asset contains resources for both the original and edited images, as well as for the PHAdjustmentData object describing the edit. To work with one of these files, fetch the underlying data using the PHAssetResourceManager class.