Xcode在每次启动时修改当前的CoreData模型版本 [英] Xcode modifies current CoreData model version at every launch

查看:174
本文介绍了Xcode在每次启动时修改当前的CoreData模型版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Xcode 4.6来处理使用CoreData的项目。数据模型现在是版本13,并使用轻量级迁移。

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.

我的问题:在每次启动Xcode似乎修改PROJECT.xcdatamodeld / .xccurrentversion文件设置为我注意到修改的文件被自动添加到GIT索引。对此文件的更改不会反映在Xcode的GUI中,它告诉我,我的模型的当前版本是13.这个问题在开发过程中的某一点开始(可能在模型版本7),并且甚至对于新的模型版本仍然存在。奇怪的是,即使不同的计算机上不同的Xcode安装显示这个项目的这种行为。

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.

我的解决方法是在每次使用GIT启动Xcode时重置对此文件的更改,但是它非常讨厌。有人想到如何解决这个问题?看起来像Xcode中的错误。

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.

推荐答案

解决:问题是在project.pbxproj文件.xcodeproj右键单击 - >显示包内容)。我删除了部分,如我的截图所示,一切运行正常。

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.

这篇关于Xcode在每次启动时修改当前的CoreData模型版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆