Greetings,
psc_options = { NSMigratePersistentStoresAutomaticallyOption:NSNumber.numberWithBool(true),
NSInferMappingModelAutomaticallyOption:NSNumber.numberWithBool(true) }
fail(error) unless @persistentStoreCoordinator.addPersistentStoreWithType(NSSQLiteStoreType,
configuration:nil, URL:url,
options:psc_options, error:error)
When what I should have been doing was something like:
psc_options = {}
psc_options[NSMigratePersistentStoresAutomaticallyOption] = NSNumber.numberWithBool(true)
psc_options[NSInferMappingModelAutomaticallyOption] = NSNumber.numberWithBool(true)
...
...or even...
psc_options = { NSMigratePersistentStoresAutomaticallyOption => NSNumber.numberWithBool(true),
NSInferMappingModelAutomaticallyOption => NSNumber.numberWithBool(true) }
It's subtle bugs like these that make me slap my head...
...but now Core Data automatic migration works! W00t!
-- Morgan
p.s. If you're trying to do Core Data migration, I found this article particularly useful: http://www.timisted.net/blog/archive/core-data-migration/