fetchAssets(with:)
Retrieves all assets matching the specified options.
Declaration
class func fetchAssets(with options: PHFetchOptions?) -> PHFetchResult<PHAsset>Parameters
- options:
Options that specify a filter predicate and sort order for the fetched assets, or
nilto use default options. For details, see Phfetchoptions.
Mentioned in
Return Value
A fetch result that contains the requested PHAsset objects, or an empty fetch result if no objects match the request.
Discussion
By default, fetch results do not include photos synced to the device through iTunes or stored in iCloud Shared Albums. To change this behavior, use the includeAssetSourceTypes property in the options parameter.