How do you check whether an image stored with CKAsset
has changed in CloudKit
?
CKNotification doc says about desiredKeys:
NSString
, NSNumber
, CLLocation
, NSDate
, and CKReference
. You cannot specify keys whose values contain other data types.CKAsset
is not on the list
If a CKAsset
is changed, then you will receive a push notification. But indeed a subscription won't send you the CKAsset
. So you know that something has changed but not what has changed. So you have to fetch the record yourself. If you want to know what has changed, then you have to compare the object to the previous value yourself. The keys that you specified are usually the keys that you also want to show in your push notification message. Since you probably want to use most values of a record, i think you will always fetch the complete record after a notification was received by your app.