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?
Ok so according to Apple's Core Data versioning guidelines, two versions are treated as being identifical if:
For each entity the following attributes must be equal: name, parent, isAbstract, and properties. className, userInfo, and validation predicates are not compared.
For each property in each entity, the following attributes must be equal: name, isOptional, isTransient, isReadOnly, for attributes attributeType, and for relationships destinationEntity, minCount, maxCount, deleteRule, and inverseRelationship.
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