Get CloudKit records created by specific user

I've been searching all over the web trying to find the proper way to get all records created by a specific user in CloudKit.

I am able to get the correct id using:

guard let userRecordID = try? await container.userRecordID() else { return }

I can see that the id returned is associated with records in my CloudKit dashboard. So I would expect that the following would get those records:

let predicate = NSPredicate(format: "%K == %@", #keyPath(CKRecord.creatorUserRecordID), userRecordID)
let query = CKQuery(recordType: "CKUser", predicate: predicate)

But instead when I use that query it returns nothing. It is successful but with nothing returned...

Any ideas why this would be happening?

P.S. I have also tried constructing the predicate using the reference, but I get the same result - success with no results.

P.S.2 Also worth mentioning that I am trying to get the results from the public database and I have set my CKContainer to the correct container id.

One more thing to note: I have added queryable to the "createdUserRecordName" and sortable for the "createdTimestamp" and "modifiedTimestamp".

Here is the complete code for what I am trying, I modified it a bit from what I originally posted, still returns 0 records even though there are 13 that it should find.

    func fetchRecords(forUserRecordID userRecordID: CKRecord.ID, completion: @escaping (Result<[CKRecord], Error>) -> Void) {
        let reference = CKRecord.Reference(recordID: userRecordID, action: .none)
        let predicate = NSPredicate(format: "creatorUserRecordID == %@", reference)
        let query = CKQuery(recordType: self.reviewRecordType, predicate: predicate)
        
        self.database.configuredWith(configuration: self.config) { db in
            db.fetch(withQuery: query) { result in
                switch result {
                case .success(let success):
                    let results = success.matchResults.compactMap {
                        try? $0.1.get()
                    }
                    
                    completion(.success(results))
                case .failure(let error):
                    completion(.failure(error))
                }
            }
        }
    }
Get CloudKit records created by specific user
 
 
Q