Switch CoreData to In-Memory Store

This commit is contained in:
Marcus Kida 2023-05-23 10:30:35 +02:00 committed by Nathan Mattes
parent 8b69ff3acd
commit c94f0126b7
1 changed files with 1 additions and 0 deletions

View File

@ -25,6 +25,7 @@ public final class CoreDataStack {
public convenience init(databaseName: String = "shared") {
let storeURL = URL.storeURL(for: AppName.groupID, databaseName: databaseName)
let storeDescription = NSPersistentStoreDescription(url: storeURL)
storeDescription.url = URL(fileURLWithPath: "/dev/null") /// in-memory store with all features in favor of NSInMemoryStoreType
self.init(persistentStoreDescriptions: [storeDescription])
}