For instance, I was following some code snippets in the Pragmatic iPhone SDK book and I had somehow ended up with the following lines:
// Create the fetch request for the entity.
NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];
// Edit the entity name as appropriate.
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Event" inManagedObjectContext:managedObjectContext];
Here the @"Event" name was wrong, as my .xcdatamodel file was actually using the name @"Track" for that entity. Changing that name in the code to match the model fixed the issue.
A similar naming mismatch was on this line:
NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"timeStamp" ascending:NO];
The correct key for my model was @"name". There were other similar issues in the code.
One could argue that this is a shortcoming of the Xcode tool, as it fails to keep the names in the code generated by wizards in synch with changes in the model. As Core Data is a relatively new addition to the iPhone SDK, it's likely this will be improved in future versions.