<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Contacts",
  "identifier" : "/documentation/Contacts/CNContact/descriptorForAllComparatorKeys()",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Contacts"
    ],
    "preciseIdentifier" : "c:objc(cs)CNContact(cm)descriptorForAllComparatorKeys"
  },
  "title" : "descriptorForAllComparatorKeys()"
}
-->

# descriptorForAllComparatorKeys()

Fetches all the keys required for the contact sort comparator.

```
class func descriptorForAllComparatorKeys() -> any CNKeyDescriptor
```

## Return Value

A descriptor object that defines the keys required by the sort comparator.

## Discussion

Use the returned object to specify the keys you want to fetch from the database. For example, use it when creating a [`CNContactFetchRequest`](/documentation/Contacts/CNContactFetchRequest) object.

---

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)