我在AppDelegate中遇到问题,但找不到错误,我检查了包标识符,但它仍然无效,有我的代码:
lazy var applicationDocumentsDirectory: NSURL = {
let urls = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)
return urls[urls.count-1] as NSURL
}()
lazy var managedObjectModel: NSManagedObjectModel = {
let modelURL = Bundle.main.url(forResource: "koalak", withExtension: "momd")!
return NSManagedObjectModel(contentsOf: modelURL)!
}()
我得到错误的屏幕截图: