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

gcc - MinGW's ld cannot perform PE operations on non PE output file -

How to connect android app to App engine -

hadoop - Running Map Reduce Job shows error - Mkdirs failed to create /var/folders/ -