I'm saving CLPlacemark
in Core data using NSValueTransformer
. (so it's saved as NSData
)
However I've come to a point where I need to filter the saved objects based on another CLPlacemark
object.
I've tried this, it doesn't work:
NSExpression *exprPath = [NSExpression expressionForKeyPath:@"placemark"]; NSExpression *exprKeyword = [NSExpression expressionForConstantValue:[NSKeyedArchiver archivedDataWithRootObject:placemark]]; NSPredicate *predicate = [NSComparisonPredicate predicateWithLeftExpression:exprPath rightExpression:exprKeyword modifier:NSDirectPredicateModifier type:NSEqualToPredicateOperatorType options:0];
So any other suggestions?