<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.13.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PhotoKit",
  "identifier" : "/documentation/Photos/PHAsset/fetchKeyAssets(in:options:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Photos"
    ],
    "preciseIdentifier" : "c:objc(cs)PHAsset(cm)fetchKeyAssetsInAssetCollection:options:"
  },
  "title" : "fetchKeyAssets(in:options:)"
}
-->

# fetchKeyAssets(in:options:)

Retrieves assets marked as key assets in the specified asset collection.

```
class func fetchKeyAssets(in assetCollection: PHAssetCollection, options: PHFetchOptions?) -> PHFetchResult<PHAsset>?
```

## Parameters

`assetCollection`

The asset collection from which to fetch assets.

`options`

Options that specify a filter predicate and sort order for the fetched assets, or `nil` to use default options. For details, see [`PHFetchOptions`](/documentation/Photos/PHFetchOptions).

## Return Value

A fetch result that contains the requested [`PHAsset`](/documentation/Photos/PHAsset) objects, or an empty fetch result or `nil` if no objects match the request.

## Discussion

Most asset collections contain a *key asset*, which the Photos app displays as a proxy for the collection. Different types of asset collections have different ways of specifying one or more key assets. For example, in the Camera Roll collection, the most recently captured photo or video is the key asset.

This method returns `nil` if the `assetCollection` parameter references a transient asset collection (such as one created with the [`transientAssetCollection(with:title:)`](/documentation/Photos/PHAssetCollection/transientAssetCollection(with:title:)) method).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)