22 lines
445 B
Swift
22 lines
445 B
Swift
|
//
|
||
|
// DataController.swift
|
||
|
// Leganto
|
||
|
//
|
||
|
// Created by Louis Hollingworth on 2023-05-21.
|
||
|
//
|
||
|
|
||
|
import Foundation
|
||
|
import CoreData
|
||
|
|
||
|
class DataController: ObservableObject {
|
||
|
let container = NSPersistentContainer(name: "Leganto")
|
||
|
|
||
|
init() {
|
||
|
container.loadPersistentStores { desc, err in
|
||
|
if let err = err {
|
||
|
print("Core Data failed to load: \(err.localizedDescription)")
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|