Unable to find Entity 'Link'


I can’t seem to figure out what is wrong here. I’m getting an error when executing the core data fetch request. Anyone have a suggestion?

*** Terminating app due to uncaught exception ‘NSInternalInconsistencyException’, reason: ‘+entityForName: could not locate an NSManagedObjectModel for entity name ‘Link’’


simple solution. I deleted the app from the simulator and then re-ran the project. However a NEW error showed up! I don’t even know where to begin.

*** Terminating app due to uncaught exception ‘NSInternalInconsistencyException’, reason: ‘attempt to insert row 28 into section 0, but there are only 28 rows in section 0 after the update’


The error message has provided you with an important clue.


that message is more like gibberish than a clue to me. I want to answer back to XCode: “yes XCode, there are 28 rows…so number 28 should not be a problem. I can understand if I’m trying to insert 29 rows when there are only 28.”

I just followed the book, and can’t find any errors. This clue isn’t helping. Have you an idea ?


I found the culprit. He was very well disguised.

NSIndexPath *ip = [NSIndexPath indexPathForRow:itemDelta inSection:0];
[rows addObject:ip];

i think autocorrect screwed me. it’s happened before.

should be: NSIndexPath *ip = [NSIndexPath i inSection:0];
[rows addObject:ip];