Contents

persistentStoreOptions

Options used when creating the document’s persistent store.

Declaration

var persistentStoreOptions: [AnyHashable : Any]? { get set }

Discussion

By default, this value is nil.

To support automatic migration, you might pass a dictionary like that shown in the following example.

NSDictionary *options = @{
    NSMigratePersistentStoresAutomaticallyOption: @YES,
    NSInferMappingModelAutomaticallyOption: @YES
};
<#Managed document instance#>.persistentStoreOptions = options;

See Also

Managing the Core Data stack