I just want to rename and add attribute on my table for a new version of my app and I want to keep the data if the app was already installed.
Firstly I just set the options:
let options = [NSMigratePersistentStoresAutomaticallyOption:true, NSInferMappingModelAutomaticallyOption:true]
try coordinator.addPersistentStoreWithType(NSSQLiteStoreType, configuration: nil, URL: url, options: options)
And I created a new version model, so if I rename the attributes and add another attributes to my table on the new model, do the app gonna keep the data ?