fetchAssets(withALAssetURLs:options:)
Retrieves assets using URLs provided by the Assets Library framework.
Declaration
class func fetchAssets(withALAssetURLs assetURLs: [URL], options: PHFetchOptions?) -> PHFetchResult<PHAsset>Parameters
- assetURLs:
An array of Nsurl objects, each an asset URL previously retrieved from an Alasset object.
- options:
Options that specify a filter predicate and sort order for the fetched assets, or
nilto use default options. For details, see Phfetchoptions.
Return Value
A fetch result that contains the requested PHAsset objects, or an empty fetch result if no objects match the request.
Discussion
The Assets Library framework is deprecated in iOS 8.0 and later, replaced by the Photos framework. Use this method if your app has previously stored URLs from ALAsset objects and you need to retrieve the corresponding Photos framework objects.