I need a way to connect a CKQueryNotification to a CKRecord or CKSubscription so I can receive updates/inserts/deletes on multiple record types. I'm successfully receiving CKNotifications and this is the payload:
{
ck = {
ce = 2;
cid = "<my cloud container id>";
nid = "<unknown guid>";
qry = {
dbs = 2;
fo = 1;
rid = "<the record id>";
sid = "<THIS IS THE SUBSCRIPTION ID>";
zid = "_defaultZone";
zoid = "_defaultOwner";
};
};
}
I can get the subscription ID by the notification payload, and I could tie the subscription ID to a local cache that knows the record type, but I want to use a CKFetchNotificationChangesOperation to retrieve unread notifications, and at that point I only have a CKQueryNotification object.
The CKQueryNotification object only has a CKRecordID, and as far as I can tell, I can't get a CKRecord from the CKRecordID. I could perform a query on all of my CKRecord->recordType's in my container but that doesn't seem right.
Any help is appreciated!