Re: Trying to custom-migrate core data
Re: Trying to custom-migrate core data
- Subject: Re: Trying to custom-migrate core data
- From: Rick Mann <email@hidden>
- Date: Fri, 18 Jul 2014 03:38:32 -0700
Turns out, my model version for the older store had gotten modified. I restored that, but then I had to re-create the mapping file. After that, automatic migration picked it up and tried to use my policies! Onward and upward…
On Jul 18, 2014, at 02:59 , Rick Mann <email@hidden> wrote:
> I'm trying to do a custom core data migration, but I'm running into an issue getting the model for the older data:
>
> NSDictionary* metadata = [NSPersistentStoreCoordinator metadataForPersistentStoreOfType: NSSQLiteStoreType URL: storeURL error: &err];
> NSManagedObjectModel* sourceModel = [NSManagedObjectModel mergedModelFromBundles: nil forStoreMetadata: metadata];
>
> metadata is valid, but sourceModel is nil.
>
> I have several versions of the same model in my (iOS) app. According to the docs, passing nil here is the right thing to do.
>
> Any ideas? Thanks!
>
>
> --
> Rick Mann
> email@hidden
>
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> 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:
>
> This email sent to email@hidden
--
Rick Mann
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden