CKQuery
doc says: Key names used in predicates correspond to fields in the currently evaluated record. Key names may include the names of the record’s metadata properties such as "creationDate” or any data fields you added to the record.
What else metadata can I use in a CKQuery
? Am I able to use record.recordID.recordName
, if yes, what is the key
for it?
Yes, you could create a CKQuery for searching a recordID like this:
var query = CKQuery(recordType: recordType, predicate: NSPredicate(format: "%K == %@", "creatorUserRecordID" ,CKReference(recordID: theSearchRecordId, action: CKReferenceAction.None)))
Where theSearchRecordId is the recordID.recordName that you are looking for
Metadata fields are recordID, recordType, creationDate, creatorUserRecordID, modificationDate, lastModifiedUserRecordID, recordChangeTag