<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CloudKit",
  "identifier" : "/documentation/CloudKit/CKRecordKeyValueSetting",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "c:objc(pl)CKRecordKeyValueSetting"
  },
  "title" : "CKRecordKeyValueSetting"
}
-->

# CKRecordKeyValueSetting

A protocol for managing the key-value pairs of a CloudKit record.

```
protocol CKRecordKeyValueSetting : NSObjectProtocol
```

## Topics

### Accessing a Record’s Fields

[`object(forKey:)`](/documentation/CloudKit/CKRecordKeyValueSetting/object(forKey:))

Returns the object that the record stores for the specified key.

[`subscript(_:)`](/documentation/CloudKit/CKRecordKeyValueSetting/subscript(_:))

Returns the object that the record stores for the specified key.

[`setObject(_:forKey:)`](/documentation/CloudKit/CKRecordKeyValueSetting/setObject(_:forKey:))

Stores an object in the record using the specified key.

[`setObject:forKeyedSubscript:`](/documentation/CloudKit/CKRecordKeyValueSetting/setObject:forKeyedSubscript:)

Stores an object in the record using the specified key.

[`allKeys()`](/documentation/CloudKit/CKRecordKeyValueSetting/allKeys())

Returns an array of the record’s keys.

[`changedKeys()`](/documentation/CloudKit/CKRecordKeyValueSetting/changedKeys())

Returns an array of keys with recent changes to their values.



---

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)