---
title: persistentStoreOptions
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uimanageddocument/persistentstoreoptions
---

# persistentStoreOptions

Options used when creating the document’s persistent store.

## Declaration

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

## Discussion

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

- [configurePersistentStoreCoordinator(for:ofType:modelConfiguration:storeOptions:)](uikit/uimanageddocument/configurepersistentstorecoordinator(for:oftype:modelconfiguration:storeoptions:).md)
- [managedObjectContext](uikit/uimanageddocument/managedobjectcontext.md)
- [managedObjectModel](uikit/uimanageddocument/managedobjectmodel.md)
- [modelConfiguration](uikit/uimanageddocument/modelconfiguration.md)
- [persistentStoreType(forFileType:)](uikit/uimanageddocument/persistentstoretype(forfiletype:).md)
