<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CloudKit",
  "identifier" : "/documentation/CloudKit/CKRecordZone/EncryptionScope-swift.enum/perZone",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "c:@E@CKRecordZoneEncryptionScope@CKRecordZoneEncryptionScopePerZone"
  },
  "title" : "CKRecordZone.EncryptionScope.perZone"
}
-->

# CKRecordZone.EncryptionScope.perZone

Zone uses per-zone encryption keys for encrypted values across all records and the zone-wide share, if present.

```
case perZone
```

## Discussion

This is an optional optimization that can reduce the overall storage used by encryption keys in a zone.
Note that:

- Record zones using per-zone encryption only support zone-wide sharing.
- Encryption scope can only be assigned at zone creation and cannot be changed for the lifetime of the zone.
- The server does not return zones using per-zone encryption to device OS versions older than the corresponding API availability version.
- An older OS trying to overwrite an existing zone using per-zone encryption due to a naming collision results in a `.serverRejectedRequest` error.
- On device OS upgrade, your application is responsible for fetching database changes via `CKFetchDatabaseChangesOperation` with a nil sync token to verify it has
  received all the zones available to it from the server.

---

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)