<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "swift: 4.2.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CloudKit",
  "identifier" : "/documentation/CloudKit/CKSubscription/NotificationInfo-swift.class/desiredKeys",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "s:So18CKNotificationInfoC8CloudKitE11desiredKeysSaySSGSgvp"
  },
  "title" : "desiredKeys"
}
-->

# desiredKeys

The names of fields to include in the push notification’s payload.

```
var desiredKeys: [CKRecord.FieldKey]? { get set }
```

## Discussion

This property contains an array of strings, each of which corresponds to the name of a field in the record that triggers the notification. When the system receives a notification, it includes the keys and their corresponding values. You can request a maximum of three keys.

For the keys you specify, the allowable types are <doc://com.apple.documentation/documentation/Foundation/NSString>, <doc://com.apple.documentation/documentation/Foundation/NSNumber>, <doc://com.apple.documentation/documentation/CoreLocation/CLLocation>, <doc://com.apple.documentation/documentation/Foundation/NSDate>, and [`CKRecord.Reference`](/documentation/CloudKit/CKRecord/Reference). You can’t specify keys with values that contain other data types. CloudKit may truncate strings that are more than 100 characters when it adds them to the notification’s payload.

---

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)