I've recently successfully done a Core Data "Lightweight Migration"; but I've noticed this required a fair bit of futzing on my part - and I'm wondering what's the absolute minimum necessary to trigger an automatic migration?
I don't mean in terms of "what data changes require a migration or else you'll crash", that's written up in a few places - but rather:
"Here's a list of things you must do at minimum to get Core Data to migrate for you".
( FWIW - below are the things I did. Some seem absolutely necessary, some perhaps not - wondering which are which? ):
NSDictionary *optionsDict = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithBool:YES],
NSMigratePersistentStoresAutomaticallyOption,
[NSNumber numberWithBool:YES],
NSInferMappingModelAutomaticallyOption, nil];
I then ran my new app over the previous version, and checked, sure enough, the migration worked and all was peachy ... but that's a lot of steps - however, so far, it DOES look like that's the minimum required.
But, for instance, how important are the options in the info-plist? If I don't change them - or - if I only change one, will the app still migrate correctly?
Thanks
Is all you need.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With