Is there an easy way to clear what is currently saved in CoreData?
It is hard to follow along with project 12 without knowing how to do that.
He has us change our data model entities around so many different times in that project, and now my app runs into problems when I try to compile it.
I had a button in my View that added 3 sample instances of my entity to my data model, and clicked it multiple times. So now there are probably 4 copies of each instance of the Entity.
Then I tried to add constraints to my Entity, add the NSMergeByPropertyObjectTrumpMergePolicy to my code, and run the app again, but it is running into errors. It says Build Succeded, but then the simulator crashes and I have a super long error in the output log. But the part of the error that seems to make sense to me says this...
NSUnderlyingException=Constraint unique violation, reason=constraint violation during attempted migration
I assume it is because it is trying to load the data with multiple copies of entities already stored in it, but I have added constraints that would not allow that data to exist in my data model. So I am wondering if there is a way that I can just clear the data from the data model without having to restart the whole project from scratch.