---
title: desiredKeys
framework: cloudkit
role: symbol
role_heading: Instance Property
path: cloudkit/cksubscription/notificationinfo-swift.class/desiredkeys
---

# desiredKeys

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

## Declaration

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

## Discussion

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 NSString, NSNumber, CLLocation, NSDate, and 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.
