Hi everybody, I'm trying to run core data migration on the store of my app but it seems to be unable to find the source object model no matter what. I tried different approaches, taking some hints by some results I found on google, but without success. This is what I tried:
- First I tried following the guide on Core Data Versioning and Migration to do it automatically. I created a new version of the model and set it as the current version. I created a mapping model and called addPersistentStoreWithType:configuration:URL:options:error: with the NSMigratePersistentStoresAutomaticallyOption option. The method returned this error: "missing source managed object model". I tried to point directly to the momd directory instead of using mergedModelFromBundles:. I tried to compile the two models as top level resources (flagging them in XCode and even moving them outside the .xcdatamodeld directory). No way. Obviously I clean all targets each time. - Since the automatic migration seems not to work in any way, I decided to do it manually, following the guide. I extract the store metadata and check if the model is compatible. Everything works fine (i checked it in the debugger), until I must find the suitable source model for the store via mergedModelFromBundles:forStoreMetadata:. Same problem as before: Core Data does not find the model and the method returns nil. I tried to move the models in every possible way also here, as for the first point. No way. My last chance is to access the correct model using the direct path, a solution that obviously sucks, because when I will need to migrate again, my code will become a mess. Please help, I do not know what to do. Thank you very much. Regards. -- Matteo Manferdini Pawn Software www.pawn-soft.com _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com