---
title: rootRecord
framework: cloudkit
role: symbol
role_heading: Instance Property
path: cloudkit/ckshare/metadata/rootrecord
---

# rootRecord

The share’s root record.

## Declaration

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

## Discussion

Discussion This property contains the root record of the shared record hierarchy if you set the shouldFetchRootRecord property of the operation that fetches the metadata to true. You can specify which fields CloudKit returns by setting the same operation’s rootRecordDesiredKeys property. The operation ignores the shouldFetchRootRecord and rootRecordDesiredKeys 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.

## See Also

### Accessing the Root Record

- [hierarchicalRootRecordID](cloudkit/ckshare/metadata/hierarchicalrootrecordid.md)
- [rootRecordID](cloudkit/ckshare/metadata/rootrecordid.md)
