如何在Xcode中删除旧的/未使用的数据模型版本 [英] How to delete an old/unused Data Model Version in Xcode
本文介绍了如何在Xcode中删除旧的/未使用的数据模型版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何删除Xcode中的旧数据模型?在菜单上禁用该选项。 (我要删除的模型尚未向公众发布-它们是临时开发模型。)
解决方案
这是黑客,但这对我有用:
- 在Xcode中将模型的当前版本设置为您要保留的版本
- 从项目中删除.xcdatamodel(右键单击->删除-> 仅删除参考)
- 显示.xcdatamodel。 Finder中的xcdatamodeld软件包(右键单击->显示软件包内容)
- 删除不再想要的.xcdatamodel文件
- 将.xcdatamodeld文件重新添加到您的项目中
这消除了手动修改任何项目元数据文件的需要。 / p>
How can I delete an old Data Model in Xcode? The option is disabled on the menu. (The models I want to delete have not been released to the public - they are interim development models.)
解决方案
It's a hack, but this worked for me:
- Set the Current version of the model in Xcode to one that you want to keep
- Remove the .xcdatamodeld from your project (Right-click -> Delete -> Remove Reference Only)
- Show the contents of the .xcdatamodeld package in the Finder (Right-click -> Show Package Contents)
- Delete the .xcdatamodel file(s) that you don't want anymore
- Re-add the .xcdatamodeld file to your project
This eliminates the need to manually modify any of the project metadata files.
这篇关于如何在Xcode中删除旧的/未使用的数据模型版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文