My plan is to delete the old Core Data stack (the NSManagedObjectModel
.momd
file & the NSPersistentStore
.sqlite
file) b
If you create a blank Core Data application you find the necessary code in Apples comments in the Application Delegate:
If you encounter schema incompatibility errors during development, you can reduce their frequency by:
Simply deleting the existing store: [[NSFileManager defaultManager] removeItemAtURL:storeURL error:nil]
Performing automatic lightweight migration by passing the following dictionary as the options parameter:@{NSMigratePersistentStoresAutomaticallyOption:@YES, NSInferMappingModelAutomaticallyOption:@YES} Lightweight migration will only work for a limited set of schema changes; consult "Core Data Model Versioning and Data Migration Programming Guide" for details.