Key to automatically attempt to migrate versioned stores.
SDKs
- iOS 3.0+
- macOS 10.5+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Core Data
Declaration
let NSMigratePersistentStoresAutomaticallyOption: String
Discussion
The corresponding value is an NSNumber
object. If the bool
of the number is true
and if the version hash information for the added store is determined to be incompatible with the model for the coordinator, Core Data will attempt to locate the source and mapping models in the application bundles, and perform a migration.