ios - NSPredicate with OR returning error -


i have problem following predicate:

    nspredicate *predicate = [nspredicate predicatewithformat:@"(creatoruserrecordid == %@) or (touser == %@)", userid, userid]; 

when use in query ckquery *query = [[ckquery alloc] initwithrecordtype:@"message" predicate:predicate]; have error says: 'ckexception', reason: 'unexpected expression'.

when use these 2 seperately this:

   nspredicate *predicate1 = [nspredicate predicatewithformat:@"(creatoruserrecordid == %@)", userid]; nspredicate *predicate2 = [nspredicate predicatewithformat:@"(touser == %@)", userid]; 

and performing query 1 of these predicates works fine. tried using nscompoundpredicate result same... ideas?

the documentation ckquery lists of valid predicate syntax. oddly, under "basic compound predicates" lists not, and, , &&. or , || not listed , apparently not supported cloudkit query predicates.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -