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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -