Returns a newly created mapping model that will migrate data from the source to the destination model.
- iOS 3.0+
- macOS 10.6+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
- Core Data
The source managed object model.
The destination managed object model.
If a problem occurs, on return contains an
NSInferrederror that describes the problem.
Mapping Model Error
The error’s user info will contain additional details about why inferring the mapping model failed (check for the following keys:
A newly-created mapping model to migrate data from the source to the destination model. If the mapping model can not be created, returns
A model will be created only if all changes are simple enough to be able to reasonably infer a mapping (for example, removing or renaming an attribute, adding an optional attribute or relationship, or adding renaming or deleting an entity). Element IDs are used to track renamed properties and entities.