Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode modifies current CoreData model version at every launch

I'm using Xcode 4.6 to work on a project which uses CoreData. The data model is now at version 13 and uses lightweight migration.

My problem: At every launch Xcode seems to modify the PROJECT.xcdatamodeld/.xccurrentversion file to be set to version 1. I noticed that the modified file is automatically added to the GIT index. The changes made to this file are NOT reflected by the GUI of Xcode which tells me that my model's current version is 13. This problem started at some point during the development process (maybe at model version 7) and persists even for new model versions. The strange thing about it that even different Xcode installations on different computers show this behavior for this project. I included a screenshot of the changes made to the file.

My workaround is to reset the changes to this file at every launch of Xcode using GIT but it's very annoying. Someone got an idea how to solve this? Seems like a bug in Xcode.

Changes made to the .xccurrentversion file at every launch

like image 310
Christoph Avatar asked Jul 13 '13 15:07

Christoph


1 Answers

Solved: The problem was an old entry in the project.pbxproj file (Open PROJECT.xcodeproj with right click -> "Show package content"). I deleted the section as shown in my screenshot and everything is running fine.

Screenshot showing the section to delete

like image 103
Christoph Avatar answered Nov 11 '22 19:11

Christoph