Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

Carter Randall
Carter Randall
3,311 Points

Diary app fetched Results controller crash

Hi, I am referencing the downloaded project and see no differences in my code or storyboard. I added an exception breakpoint and it landed on this line in viewDidLoad of the entryListViewController: [self.fetchedResultsController performFetch:nil];
Has something changed where this performFetch is no longer valid?

Carter Randall
Carter Randall
3,311 Points

Fixed it! I replaced the line with NSError *error; if( ![[self fetchedResultsController] performFetch:&error]) { NSLog(@"ERROOOR %@, %@",error, [error userInfo]); }

this logged it and told me that "date" in sortDescriptors was not available. I had not selected "use scalar values for primitive date types" and so my date was NSDate not NSTimeInterval.