尝试查看 .xcdatamodel 时 XCode 崩溃
我有一个由 Core Data 支持的应用程序,我已经研究了一段时间了。我使用版本控制(以前的 SVN,现在的 Git)在不同的 Mac 之间移动它。
前几天,我无法打开该项目。哦废话。幸运的是,由于时间机器,我能够回到过去,并恢复到早期版本。我怀疑 XCode 项目文件或核心数据文件的某些内容在这里起作用(我遇到了一些问题 这个人做到了,我猜),但一切似乎都很顺利,所以我继续前进。
但现在,我意识到当我尝试在 XCode 中打开 .xcdatamodel 文件时,我无法打开。它只是挂起,然后我就强制退出了。除此之外,该应用程序运行得很好。我可以将其部署到模拟器或设备上,并且它可以工作。但我不知道我怎么还有希望编辑。有什么建议可以解决这个问题吗?
I have an app, backed by Core Data, that I've been working on for awhile. I use version control (formerly SVN, now Git) to move it around between different Macs.
The other day, I was unable to open the project. OH CRAP. Luckily, due to Time Machine I was able to go back in time, and reverted to an earlier version. I suspected that something with either the XCode project files or the Core Data files was at play here (I ran into some of the problems that this guy did, I guess), but everything seemed to be working so I moved along.
But now, I realized that when I try to open the .xcdatamodel file in XCode, I can't. It just hangs and then I wind up Force quitting. Aside from that though, the app works totally fine. I can deploy it to the simulator or a device and it works. But I don't know how I have any hope of editing. Any tips on what I can do to fix this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我现在处于同样的情况,但是当我仔细查看模型文件原始文本时,我看到所有元素都具有关于屏幕矩形的奇怪属性,
因此我将其更改为
适用于所有实体。这成功了,现在我可以在 Xcode 中再次打开模型文件。
I was right now in the same situation, but when I've a close look to my model file raw text I saw all elements with strange attributes regarding screen rect
so I change this to
for all the entities. This did the trick, now I'm able to open to model file again in Xcode.
最后,我删除了 XCode 中的模型文件并重写了它。幸运的是,时间并不长。如果其他人对如何修复损坏的模型文件有不同的建议,请留言,我可以将您的答案标记为已接受。
In the end, I wound up deleting the model file in XCode and rewriting it. Luckily it didn't take very long. If anybody else has a different suggestion on how to fix a corrupted model file please chime in and I can mark your answer as accepted.