I have a model file thats named \"Model\". If I rename it to \"SomeOtherName\" it just does not get loaded.
initWithContentsOfURL
returns nil and:
I just ran into the same problem. Here is how I solved it:
Renaming the model file alone is not enough, because it does not rename the reference to the current model version.
It turns out the model version is stored in a separate plist file. Simply open it in a text editor and change the old name to your new model file name.
File: YourNEWModelFile.xcdatamodeld/.xccurrentversion
_XCCurrentVersionName
YourModelFile.xcdatamodel <-- Change this to YourNEWModelFile
Please note that you should only do this if you rename the model file during development. For migrating your data model to a new version, follow the Core Data docs.