How to delete an old/unused Data Model Version in Xcode

后端 未结 4 1326
情话喂你
情话喂你 2020-11-29 16:00

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 develop

4条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-29 16:21

    It's a hack, but this worked for me:

    1. Set the Current version of the model in Xcode to one that you want to keep
    2. Remove the .xcdatamodeld from your project (Right-click -> Delete -> Remove Reference Only)
    3. Show the contents of the .xcdatamodeld package in the Finder (Right-click -> Show Package Contents)
    4. Delete the .xcdatamodel file(s) that you don't want anymore
    5. Re-add the .xcdatamodeld file to your project

    This eliminates the need to manually modify any of the project metadata files.

提交回复
热议问题