0

I managed to break my xcdatamodel file somehow. It shows up in Xcode with three files inside, two of which are red and can't be edited, and a third that has a ? beside it. That file actually exists in the xcdatamodel bundle, the two red ones do not.

So I set the Model Version to select the one that isn't red and ran the app. That gets me a:

Can't find model for source store

I suspect this has something to do with the IDs it uses to find the file?

Any suggestions on where to look? I'd like to remove the links to the non-existent files, and get the one that is there working again.

Maury Markowitz
  • 9,082
  • 11
  • 46
  • 98
  • 1
    I don't suppose this model file was committed to a source control repository like git, was it? Because at this point I'd be checking out the previous version to clean up the mess. – Tom Harrington Mar 27 '14 at 22:33
  • Yes, it was, and checking out seems to have fixed it. However, I'm now very concerned about the whole versioning issue when I push this app out! – Maury Markowitz Mar 30 '14 at 17:13
  • All that matters is whether you had uncommitted changes to the data model that git would not have restored. If there are any, you'd need to redo them, but otherwise, there's no (new) problem from this. – Tom Harrington Mar 30 '14 at 19:10

0 Answers0