CKReferenceの有無にかかわらず、CKRecordまたはCKRecordIDを使用して関係を照合できます。
CKレコード:
let predicate = NSPredicate(format: "artist == %@", artist)
CKRecordID:
let predicate = NSPredicate(format: "artist == %@", artistID)
CKRecord を使用した CKReference:
let recordToMatch = CKReference(record: artist, action: CKReferenceAction.None)
let predicate = NSPredicate(format: "artist == %@", recordToMatch)
CKRecordID を持つ CKReference:
let recordToMatch = CKReference(recordID: artistID, action: CKReferenceAction.None)
let predicate = NSPredicate(format: "artist == %@", recordToMatch)