<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CloudKit",
  "identifier" : "/documentation/CloudKit/CKShare/Metadata/rootRecord",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "c:objc(cs)CKShareMetadata(py)rootRecord"
  },
  "title" : "rootRecord"
}
-->

# rootRecord

The share’s root record.

```
@NSCopying var rootRecord: CKRecord? { get }
```

## Discussion

This property contains the root record of the shared record hierarchy if you set the [`shouldFetchRootRecord`](/documentation/CloudKit/CKFetchShareMetadataOperation/shouldFetchRootRecord) property of the operation that fetches the metadata to <doc://com.apple.documentation/documentation/Swift/true>. You can specify which fields CloudKit returns by setting the same operation’s [`rootRecordDesiredKeys`](/documentation/CloudKit/CKFetchShareMetadataOperation/rootRecordDesiredKeys-3xrex) property.

The operation ignores the [`shouldFetchRootRecord`](/documentation/CloudKit/CKFetchShareMetadataOperation/shouldFetchRootRecord) and [`rootRecordDesiredKeys`](/documentation/CloudKit/CKFetchShareMetadataOperation/rootRecordDesiredKeys-3xrex) properties when fetching a shared record zone’s metadata because, unlike a shared record hierarchy, a record zone doesn’t have a nominated root record.

---

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)