ios - NSPredicate with ANY and "=nil" doesn't work -


this condition works

nspredicate *predicate = [nspredicate predicatewithformat:        @"any region.beacons.major = %d",rangedbeacon.major.intvalue]; 

but not

nspredicate *predicate = [nspredicate predicatewithformat:        @"any region.beacons.minor = nil"]; 

beacons list inside region object. major , minor have type nsnumber

you may try this:

nspredicate *predicate = [nspredicate predicatewithformat:@"any region.beacons.minor = $minor"]; predicate = [predicate predicatewithsubstitutionvariables: [nsdictionary  dictionarywithobject:[nsnull null] forkey: @"minor"]]; 

Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -