Deleting core data version xcdatamodel files

后端 未结 2 501
死守一世寂寞
死守一世寂寞 2020-12-14 06:57

I\'ve created a versioned Core Data model in my iOS app, and it has several versions created so far (several .xdatamodel files within the .xcdatamodeld bundle). Before shipp

2条回答
  •  长情又很酷
    2020-12-14 07:14

    If you want to get rid of old versions of the data model

    (Note: make sure you copy the Data model file and save it somewhere in case something goes wrong)

    Five Step solution

    1. Select .xcdatamodeld file in Xcode, make sure you have the latest version is set as the current data model.
    2. Right, Click Show in finder if you don't see all your versions right click again and show package contents.
    3. Delete all the version except the latest.
    4. Jump back to Xcode and now delete the .xcdatamodeld file just remove reference don't move to trash.
    5. Add the file back again

    Voila it's done

提交回复
热议问题