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.
The error message is “Cannot create an NSPersistentStoreCoordinator with a nil model”, so that indicates there’s something wrong with your
managedObjectModelmethod.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
managedObjectModelmethod.Afterwards, it still doesn’t work and setting a breakpoint in the
managedObjectModelmethod reveals that it is actually never called. That’s because you have a typo there, you’ve called the methodmangedObjectModelinstead ofmanagedObjectModel. After adding the missinga, your app should run.