3

I have a project that uses CoreData on iOS and we have gone through numerous model updates with the lightweight migration technique and the NSInferMappingModelAutomaticallyOption set to YES. This works perfectly fine, but for the current transition we need to specify some more information and thus create a mapping model.

I created the mapper by going to File->New and create a new data model mapper that maps the old version of my model to the new version. The mapper is in the Resources folder in the project. Before doing any customization I wanted to check whether the model works and removed the NSInferMappingModelAutomaticallyOption from the options Dictionary when creating the persistentStoreCoordinator. However, now I get an error that says "Can't find mapping model for migration" even though I can see that the compiled mapper is bundled with the app.

Where do I have to put the data model mapper such as that it is found automatically? I use XCode 4.0

Robin
  • 8,197
  • 11
  • 45
  • 74

1 Answers1

1

Turns out the answer is very simple: Upgrade from XCode 4.0 to (at least) XCode 4.0.2 and it works like a charm. Must be a bug in the XCode version.

Robin
  • 8,197
  • 11
  • 45
  • 74