swiftnspredicateicloudcloudkitckquery

CloudKit predicate: Search multiple reference fields with predicate of CKQuery


Using Apple CloudKit, I have a record user and a join table record to connect users and to save the state of the relationship. This means that users can request to be friends and the other party has to accept first.

Now I want to query for those relationship records the user was a part of. This means in the CKReference field Sender and the createdBy field (also CKReference).

How do I build a valid predicate for CKQuery to find records where either the sender or the createdBy is equal to the current user?

Apparently CKQuery doesn't support OR and CONTAINS works only on Strings...


Solution

  • As @Thunk pointed out. Not possible as of today