I am trying to find the oldest date in a specific attribute in Core Data. I found an example in the Master Data Programming Guide that tries to do just that, but keep getting the unrecognized selected error when it starts.
My code (with minimal changes in the Apple example):
NSFetchRequest *request = [[NSFetchRequest alloc] init]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"Session" inManagedObjectContext: ctx]; [request setEntity:entity];
And the error:
-[NSCalendarDate count]: unrecognized selector sent to instance ...
Which is strange, given that 1) NSCalendarDate is deprecated and 2) I definitely do not call the bill.
Any help would be appreciated!
cocoa core-data nsfetchrequest
AndrewO
source share