Search code examples
iosxcodecore-datacore-data-migrationmodelmapper

Destination attribute mapping not showing newly added attribute in xcmodelmappingmodel while Coredata migration


I have a coredata mapping where Version model had 4 attributes

appName, authCode, passPhrase, appVersion.

But on the next version of Coredata the passPharse entity was dropped. And no mapping for passPhrase was there.

Later I added another attribute in Version model

oldPassPhrase

but on the Entity Mapping VersionToVersion it is not showing on Destination attribute dropdown. Other 3 attributes are there.

How can I get the oldPassPhrase attribute on Destination attribute dropdown of xcmodelmappingmodel


Solution

  • Creating a new .xcmappingmodel solved my problem.