---
title: "fetchAssetCollections(withALAssetGroupURLs:options:)"
framework: photos
role: symbol
role_heading: Type Method
path: "photos/phassetcollection/fetchassetcollections(withalassetgroupurls:options:)"
---

# fetchAssetCollections(withALAssetGroupURLs:options:)

Retrieves asset collections using URLs provided by the Assets Library framework.

## Declaration

```swift
class func fetchAssetCollections(withALAssetGroupURLs assetGroupURLs: [URL], options: PHFetchOptions?) -> PHFetchResult<PHAssetCollection>
```

## Parameters

- `assetGroupURLs`: An array of doc://com.apple.documentation/documentation/Foundation/NSURL objects, each an asset group URL that was previously retrieved from an doc://com.apple.documentation/documentation/AssetsLibrary/ALAssetsGroup object.
- `options`: Options that specify a filter predicate and sort order for the fetched asset collections, or nil to use default options. For details, see doc://com.apple.photokit/documentation/Photos/PHFetchOptions.

## Return Value

Return Value A fetch result that contains the requested PHAssetCollection objects, or an empty fetch result if no objects match the request.

## Discussion

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 ALAssetsGroup objects and you need to retrieve the corresponding Photos framework objects.

## See Also

### Fetching Asset Collections

- [fetchAssetCollections(withLocalIdentifiers:options:)](photos/phassetcollection/fetchassetcollections(withlocalidentifiers:options:).md)
- [fetchAssetCollections(with:subtype:options:)](photos/phassetcollection/fetchassetcollections(with:subtype:options:).md)
- [fetchAssetCollectionsContaining(_:with:options:)](photos/phassetcollection/fetchassetcollectionscontaining(_:with:options:).md)
- [fetchMoments(inMomentList:options:)](photos/phassetcollection/fetchmoments(inmomentlist:options:).md)
- [fetchMoments(with:)](photos/phassetcollection/fetchmoments(with:).md)
