---
title: encryptionScope
framework: cloudkit
role: symbol
role_heading: Instance Property
path: cloudkit/ckrecordzone/encryptionscope-swift.property
---

# encryptionScope

The encryption scope determines the granularity at which CloudKit stores encryption keys within the zone.

## Declaration

```swift
var encryptionScope: CKRecordZone.EncryptionScope { get set }
```

## Discussion

Discussion Zone encryption scope defaults to CKRecordZoneEncryptionScopePerRecord and can only be modified before zone creation. Attempting to change the encryption scope of an existing zone is invalid and results in an error. Zones using CKRecordZoneEncryptionScopePerZone can only use zone-wide sharing and are not compatible with older device OS versions. Refer to CKRecordZoneEncryptionScope for more info.
