1
votes

I get this warning for my xdatamodeld file: "Version hash information not available for all models". How do I get rid of this? I've also started to get a crash at startup when I install the app as new ... wonder if they're related? This is the crash:

* Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Cannot create an NSPersistentStoreCoordinator with a nil model'

4

4 Answers

3
votes

This is a iOS5 beta issue, caused by having a fetch request in your model file. For now, removing the fetch request fixes it.

0
votes

I am experiencing the same thing once I have installed Xcode 4.2 with iOS 5 beta 5, maybe it's something there? I did not have is last night while working on my production system, with Xcode 4.1. Unfortunately I am reinstalling it now, and it'd take a while before i know whether that's the cause.

0
votes

The first error indicates that you have multiple .xcdatamodel files with the same name but different versions. One of more of the multiples lacks an internal version number i.e. the version hash.

The second error is caused by the first because the managed object model cannot create itself by merging model files of the same name but different and unknown versions. A persistent store coordinator in turn cannot intialize without a valid managed object model.

If this is occurring in development and you don't have multiple versions intentionally, then you probably have an old compiled .mom or .momd file on the simulator from a previous build. Delete the app off the simulator entirely, then clean the entire project in Xcode and rebuild and reinstall. That usually resolves the problem.

0
votes

I ran into this problem on iOS 5 SDK and it wasn't any of the above problems. My problem was because I had a lot of attributes in a single entity, that I inadvertently had a duplicate (i.e. two lastUpdatedDate attributes in the same entity).