Reputation: 6755
I'm following this book tutorial to learn core data (Apress Pro Core Date for iOS 2nd Edition). And I thought I was following correctly but I ran into an error I dont know how to solve. The code is posted here.
I'm interested not only in the correction to the problem, but the steps you took to find out what the problem is.
Upvotes: 0
Views: 55
Reputation: 53561
The error message is "Cannot create an NSPersistentStoreCoordinator with a nil model", so that indicates there's something wrong with your managedObjectModel
method.
First off, you named your model file as "Model", but the method is looking for one called "OrgChart", so either rename your model file or change the name in the managedObjectModel
method.
Afterwards, it still doesn't work and setting a breakpoint in the managedObjectModel
method reveals that it is actually never called. That's because you have a typo there, you've called the method mangedObjectModel
instead of managedObjectModel
. After adding the missing a
, your app should run.
Upvotes: 2