Top "Nspredicate" questions

The NSPredicate class is used in Mac OS X and iOS development to define logical conditions used to constrain a search either for a fetch or for in-memory filtering.

fetch request for entity.attribute == @"somevalue"

How do I setup a fetch request to only pull the data from an entity's attribute with one particular value? …

core-data attributes nspredicate nsfetchrequest
Using NSPredicate to filter based on multiple keys (NOT values for key)

I have the following NSArray containing NSDictionary(s): NSArray *data = [[NSArray alloc] initWithObjects: [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithInt:1], @"bill", [NSNumber numberWithInt:2], @"…

objective-c cocoa nsarray nspredicate
core data how to filter (NSPredicate) including a relationship requirement and given the relationship object?

How would I filter (construct an NSPredicate) for the following. Have a SCHOOL and PERSON entities One-to-many relationship, i.e. …

ios swift core-data relationship nspredicate
How to limit the result count of NSFetchRequest?

I want to have a feature of "Recent 20 Items" in my iOS app. I use Core Data and NSFetchRequest. How …

iphone objective-c ios core-data nspredicate
NSPredicate: Fetch one of each kind

I want to create an NSFetchRequest for objects like this: The Object is Car which has an attribute color. I …

iphone ios objective-c nspredicate nsfetchedresultscontroller
Core Data NSPredicate fetch on entity relationship using in clause

I would like to be able to search the relationship of an entity using an IN clause. I have the …

ios swift core-data nspredicate nsfetchrequest
NSPredicate with boolean is not comparing a boolean to NO

I'm using CoreData and my entity has a boolean property called "isReward". I'm trying to fetch the entity and filter …

cocoa core-data nspredicate
Multiple NSPredicate

I'm trying to prepare multiple search in my CoreData entity Recipes. There are parameters by which I would like to …

ios nspredicate
NSPredicate endswith multiple files

I am trying to filter an array using a predicate checking for files ending in a set of extensions. How …

iphone objective-c nspredicate
Using NSPredicate with Core Data for deep relationships

I have an NSArrayController, companiesController bound to a top level Core Data entity, Companies. A Company has many Department's, and …

objective-c core-data nspredicate cocoa-design-patterns