Is it possible to query a CKRecord by recordName?

So in the CloudKit dashboard I have the "recordName" field marked as queryable.

I notice that this query fails with an error:

Code Block
     CKQuery *query = [[CKQuery alloc]initWithRecordType:recordType
                                             predicate:[NSPredicate predicateWithFormat:@"recordName == %@",recordName]];


I get an error. It seems I have to put the recordName in a CKRecordID, and then query for recordID to essentially query by the unique recordName.

Is querying by recordName directly not supported or am I doing something wrong?


Can you share details on the error you are seeing here?
Sure. The error is "Invalid Arguments" (12/2018); server message = "Unknown field 'recordName'";
Is it possible to query a CKRecord by recordName?
 
 
Q