↧
Answer by Cristian Pena for How to tear down Core Data Stack?
Since 2015, Apple introduced a new method called destroyPersistentStore(at:,ofType:,options:)guard let storeURL = persistentContainer.persistentStoreCoordinator.persistentStores.first?.url else {...
View ArticleAnswer by shallowThought for How to tear down Core Data Stack?
The old data has nothing to do with your context but with your PersistentStore. This is what you are using Core Data for, persist your data. Delete the store to get rid of your data before initializing...
View ArticleHow to tear down Core Data Stack?
I want to add unit tests for my Core Data app, but I am sure how to reset the context between tests.This is my CoreDataStack object:public final class CoreDataStack { var storeType: StoreType! public...
View Article