Search code examples
iosobjective-ccocoacore-datacore-data-migration

How to get Processed string from string in Core Data


In my application I have used core data for data persistent.

I have one entity "Networks"

Networks entity have one attribute ip address.

Many times ip address is not in well format . Can I transform one raw ip string to other well form string i.e can I process core data entity attribute value using heavy core data migration like custom Entity Migration Policies .

When to go for Custom Entity Migration Policies


Solution

  • When is a migration necessary? The easiest answer to this common question is “when you need to make changes to the data model.”

    You need to opt for Custom Entity Migration only when you have changed the entity type of your attribute.

    You can get more information about this topic in here : https://www.raywenderlich.com/174025/lightweight-migrations-in-core-data-tutorial