Greetings,
I was trying to set up automatic migration, and did this brain-o, which will be obvious to most folks, but stumped me for a little bit:

    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/