I am working on a Core Data based iOS application , in which i stored an array strings in coredata as NSData(binary data).
While fetching the data , how can i write a NSPredicate which will only retrieve the result with NSData value contain given string .
if name attribute is a string then i can write a predicate like below.
NSString *inputName = @"bbb";
NSPredicate * predicate = [NSPredicate predicateWithFormat:@"name = %@",inputName];
my question is
what will be the predicate if name is NSData and this NSData from
NSArray *anArray = [NSArray arrayWithObjects:@"aaa",@"bbb",@"ccc",nil];
NSData *arrayData = [NSArchiver archivedDataWithRootObject:anArray];
arrayData is stored as name attribute in Core Data .
I hope this information is enough to understand my problem.
Thanks in advance.
i found the answer ..converted
NSArraytoNSSetand store it in entity