get rid of warning with core data
This commit is contained in:
@@ -197,20 +197,15 @@ class PersistenceController {
|
||||
} else {
|
||||
container = NSPersistentContainer(name: "Feels")
|
||||
}
|
||||
|
||||
guard let description = container.persistentStoreDescriptions.first else {
|
||||
fatalError("Could not retrieve a persistent store description.")
|
||||
}
|
||||
|
||||
description.setOption(true as NSNumber, forKey: NSPersistentHistoryTrackingKey)
|
||||
container.viewContext.automaticallyMergesChangesFromParent = true
|
||||
|
||||
|
||||
for description in container.persistentStoreDescriptions {
|
||||
description.setOption(true as NSNumber, forKey: NSPersistentStoreRemoteChangeNotificationPostOptionKey)
|
||||
description.setOption(true as NSNumber, forKey: NSPersistentHistoryTrackingKey)
|
||||
}
|
||||
|
||||
container.loadPersistentStores(completionHandler: { (storeDescription, error) in
|
||||
self.container.viewContext.automaticallyMergesChangesFromParent = true
|
||||
|
||||
if let error = error as NSError? {
|
||||
fatalError("Unresolved error \(error), \(error.userInfo)")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user