美文网首页本地缓存
[Core Data small tips] How to re

[Core Data small tips] How to re

作者: 扬仔360 | 来源:发表于2016-05-06 13:04 被阅读125次

尝试写一篇纯英文的。

How to remove a Data Model Version in Xcode.

When you need to migration data model, you will create lots of data model version.

You will know that it is easy to create a data model veresion. But it is hard to find a way to delete one when it's useless for you.

here present a way to delete a data model version:

  1. right-click your .xcdatamodeld file in xcode files inspector, select the show in finder, and you will your .xcdatamodeld file in finder.

  2. Next, right-click the .xcdatamodeld file and select Show Package Contents, then you can see all you data model version.

  3. Back to Xcode, delete the reference of your .xcdatamodeld file, (remember just to delete the refreence, but to move to trash).

  4. Remove the data model version you didn't want anymore in finder.

  5. Add the .xcdatamodeld file back to your project in Xcode.

Then you got a new .xcdatamodeld file without the data model version you want to delete.

相关文章

网友评论

    本文标题:[Core Data small tips] How to re

    本文链接:https://www.haomeiwen.com/subject/dwkjrttx.html