1
votes

I have a standalone .xcdatamodeld file which I want to edit as a standalone file, not inside a Xcode project.

I know I can edit specific .xcdatamodel files if I right click in the .xcdatamodeld directory and click "Show Package Contents". I can even create new .xcdatamodel files from the top menu (Editor > Add Model Version...).

However, I cannot change the current model version of the .xcdatamodeld file. This option does not show in the file inspection on the right panel.

As far as I know the name of the current version is stored in a plist file named .xccurrentversion inside the .xcdatamodeld directory.

Anyone knows how could I change this from inside Xcode?

1

1 Answers

1
votes

I have had this happen before.

To fix it I just opened the file in vim (or textedit/subethaedit/your text editor of choice) and fixed the model version myself.

Make sure you do a search through the document for any references to the model version. I also believe that it may be mentioned in the .plist files that define your project/workspace, so you probably want to do a search in those files as well.