Hi. I have no clue what I am doing wrong or am i missing something else. I keep getting the error message
CoreData: error: Failed to load model named DMTideCity
Please see attached image for data model. My goal is just to load this but I dont know why I keep getting that error message.
struct TideDataController {
static let shared = TideDataController()
let cityContainer: NSPersistentContainer
init() {
print("init")
cityContainer = NSPersistentContainer(name: "DMTideCity")
print(cityContainer)
cityContainer.loadPersistentStores { description, error in
if let error {
print("Core Data Citys failed to load: \(error.localizedDescription)")
}
else {
print("Core Data Citys loaded")
}
}
}
}
In my view, i declare a variable like this
let tideDataController = TideDataController.shared
So it never reaches the print(cityContainer) because of that error message.
Thoughts?