My AppDelegate came with the following all familiar Core Data template:
lazy var persistentContainer: NSPersistentContainer = { let container = NSPersistentContainer(name: "newsapp") container.loadPersistentStores(completionHandler: { (storeDescription, error) in if let error = error as NSError? { fatalError("Unresolved error \(error), \(error.userInfo)") } }) return container }()
He also had the following comment:
Permanent container for the application. This implementation creates and returns a container, loading storage for the application to it. This property is optional because there are legitimate ones that can lead to a failure in creating the repository.Replace this implementation with code to handle the error correctly. fatalError()forces the application to generate a crash log and shut down. You should not use this feature in a delivery application, although this may be useful in development.The following are typical causes of the error:The parent directory does not exist, cannot be created or is not writable.- ..., , .
Permanent container for the application. This implementation creates and returns a container, loading storage for the application to it. This property is optional because there are legitimate ones that can lead to a failure in creating the repository.
Replace this implementation with code to handle the error correctly. fatalError()forces the application to generate a crash log and shut down. You should not use this feature in a delivery application, although this may be useful in development.
fatalError()
The following are typical causes of the error:
, , .
, - , , , - , , . .
, ? , , , ?
, .
fatalError "", , , , . , , .
fatalError
- , . - , , . fatalError , - .
, , , , - , . . - , , . , iOS , , .
, , fatalError .
Source: https://habr.com/ru/post/1683858/More articles:Kotlin - convert cycle to functional style - functional-programmingОтправка электронной почты из контактной формы Create-React-App - javascriptWhat is the difference between #include "MyClass.h" and #include ". \ Myclass.h" - c ++Matrix not adding correctly - pythonASP.NET Core 2.0 only searches in public folders - asp.netHow to Plan the Most Effective Patio Route - algorithmHow to handle _persistentStoreCoordinator errors in the first release? - iosCan Visual Studio Code work with .NET Core mixed language solutions? - c #The solution of the Chinese postman algorithm with ailerization - rTemplate template arguments not matching template template arguments - c ++All Articles