xcodecore-datafetched-properties

xcdatamodeld changes not reflected in built app?


I have been struggling to get fetched properties working correctly in my app and have been finding it extremely confusing - mainly due to this strange issue I have finally figured out!

Basically if I change the Predicate on a Fetched Property in my xcdatamodeld and then Build-Run the app ignores this new Predicate and continue to used the old Predicate.

Hard to describe how absolutely annoying and frustrating this is, but am sure I am not the first to encounter this.

Any idea's on how I can force this to update the changes with each rebuild?


Solution

  • Ok so according to Apple's Core Data versioning guidelines, two versions are treated as being identifical if:

    So looks like changing a fetched property's predicate doesn't qualify as a 'change' ... how wonderfully confusing.

    You can force it to consider the model 'changed' by changing the value of the Core Data Model Identifier