Reputation: 1
I have the following code:
let pred = NSPredicate(format: "content IN %@ AND (tallied == 0 OR comment != '')", arr)
let query = CKQuery(recordType: "Rating", predicate: pred)
Which throws Terminating app due to uncaught exception 'CKException', reason: 'Unexpected expression: tallied == 0 OR comment != ""'
But when I try
"content IN %@ AND (tallied == 0)"
it works fine, same with
"content IN %@ AND (comment != '')"
But I need to be able to query all records that have tallied == 0 OR comment != ''. How do I structure this?
Upvotes: 0
Views: 133
Reputation: 10479
The CKQuery not supported for OR: https://developer.apple.com/library/prerelease/ios/documentation/CloudKit/Reference/CKQuery_class/index.html#//apple_ref/doc/uid/TP40014043-CH1-SW8
Upvotes: 1