<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CloudKit",
  "identifier" : "/documentation/CloudKit/CKRecordZone/share",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "c:objc(cs)CKRecordZone(py)share"
  },
  "title" : "share"
}
-->

# share

A reference to the record zone’s share record.

```
@NSCopying var share: CKRecord.Reference? { get }
```

## Discussion

CloudKit sets this property only for fetched record zones that contain a share record; otherwise, it’s `nil`.

To share a record zone, create a share record using the [`init(recordZoneID:)`](/documentation/CloudKit/CKShare/init(recordZoneID:)) method and then save it to the server. Shared record zones must have the [`zoneWideSharing`](/documentation/CloudKit/CKRecordZone/Capabilities-swift.struct/zoneWideSharing) capability, which CloudKit enables by default for new custom record zones in the user’s private database.

A record zone, and the records it contains, can take part in only a single share. CloudKit returns an error if you attempt to share an already-shared record zone, or if that record zone contains previously shared records.

Record zone sharing errors include the following:

- [`CKError.Code.serverRecordChanged`](/documentation/CloudKit/CKError/Code/serverRecordChanged), which CloudKit returns if you try to share an already-shared record zone.
- [`CKError.Code.serverRejectedRequest`](/documentation/CloudKit/CKError/Code/serverRejectedRequest), which CloudKit returns if you try to share a record hierarchy from an already-shared record zone.
- [`CKError.Code.invalidArguments`](/documentation/CloudKit/CKError/Code/invalidArguments), which CloudKit returns if you try to share a record zone that contains one or more shared hierarchies.

---

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)