---
title: descriptorForRequiredKeys()
framework: contactsui
role: symbol
role_heading: Type Method
path: contactsui/cncontactviewcontroller/descriptorforrequiredkeys()
---

# descriptorForRequiredKeys()

Returns the descriptor for all the keys that must be fetched on the contact before setting it on the view controller.

## Declaration

```swift
class func descriptorForRequiredKeys() -> any CNKeyDescriptor
```

```swift
nonisolated class func descriptorForRequiredKeys() -> any CNKeyDescriptor
```

## Return Value

Return Value Descriptor for all the keys that must be fetched.

## Discussion

Discussion Pass this descriptor to the keysToFetch of the CNContactFetchRequest if you want to display the contact in a CNContactViewController.
