The FootBook

Mobile Makers Day 18 — Core Data Part 2, NSFetchedResultsControllerDelegate, Entity Relationships

Robert Figueras
my iOS Dev Journal

--

Today was rough for me. We continued our lessons on Core Data and the hackwich was very powerful, in that in a few lines of code, alot of stuff was happening. I was very excited about what it could do and what we could do with it.

I had thought I had a grasp of the concept and it didn’t seem all to different from the other lessons. However, I was really struggling with the challenge. The challenge was a weird version of Facebook except with feet. Yeah…feet.

I couldn’t get the data to filter based on an NSPredicate applied to FetchRequestController. It just wouldn’t filter. I got lots of help in reviewing my code but I just couldn’t get it to work. I had hit a wall.

It was one of those things again where there were no compile errors and I was logging as much as I could, but there was no feedback on what the problem was. It just didn’t work.

I finally figured out the filtering. I believe that I didn’t have an NSSortDescriptor applied to it. After I added one (after spending hours on it), it seemed to work.

However, with all the other mucking around, it wasn’t persisting. Ugh!

I’m really going to have to redo this one. I’m planning on making some time to revisit this during the next few days.

As a side, I remember finding myself just staring at the screen. I don’t think I was even fully reading the code. I was just like, wtf. I believe it was due to the fact that I only got 4 hours of sleep last night and only 3.5 hours of sleep the night before.

I’m going to get some sleep tonight, and fight again tomorrow.

--

--

Robert Figueras
my iOS Dev Journal

in order of importance: Papa, Hubby, Son, Sib, iOS Developer, Software Consultant, Musician, Entrepreneur Wannabe