<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "swift: 4.2.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CloudKit",
  "identifier" : "/documentation/CloudKit/CKFetchShareMetadataOperation/rootRecordDesiredKeys-3xrex",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "s:So29CKFetchShareMetadataOperationC8CloudKitE21rootRecordDesiredKeysSaySSGSgvp"
  },
  "title" : "rootRecordDesiredKeys"
}
-->

# rootRecordDesiredKeys

The fields to return when fetching the root record.

```
var rootRecordDesiredKeys: [CKRecord.FieldKey]? { get set }
```

## Discussion

For a shared record hierarchy, and when [`shouldFetchRootRecord`](/documentation/CloudKit/CKFetchShareMetadataOperation/shouldFetchRootRecord) is <doc://com.apple.documentation/documentation/Swift/true>, set this property to specify which of the root record’s fields the operation fetches. Use `nil` to fetch the entire record. CloudKit ignores this property for a shared record zone because, unlike a hierarchy, it doesn’t have a nominated root record.

The default value is `nil`.

---

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)