I have been trying to get the core data lightweight migration working. Ran into an very difficult issue. I have setup up automatic lightweight migration exactly like the documents and other SO posts. And then I create a new version, select it as current, add a new field to some entity, and then ran. Got error:
migration failed with error Error Domain=NSCocoaErrorDomain Code=134140 "The operation couldn’t be completed. (Cocoa error 134140.)" UserInfo=0xce08c10 {reason=Can't find or automatically infer mapping model for migration,
One more error:
NSUnderlyingError = "Error Domain=NSCocoaErrorDomain Code=134190 \"The operation couldn\U2019t be completed. (Cocoa error 134190.)\" UserInfo=0xcdf2d00 {reason=Each property must have a unique renaming identifier}";
I have googled for "Each property must have a unique renaming identifier" for a while and found no result at all.
From the meaning of this error message, the properties should have unique renaming identifier. I go back to my model setting and found that I did have some renaming identifier exactly same.
My question is I didn't really change the model name at all. I just add a new field. I thought renaming identifier will only be useful when trying to renaming something. Or maybe it's required no matter what. If that's the case, then why XCode doesn't give us any warning or error about it? shouldn't it be very obvious for XCode to see?
Any suggestion is welcome.