Contents

desiredKeys

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

Declaration

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 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.