0
我开发了一个iOS应用程序。该应用程序使用CoreData,我可能会在未来更新CoreData上的某些内容。CoreData防止更新崩溃
我知道如果CoreData发生任何更改,应用程序将因为更改而崩溃(在具有旧版本的设备上),并在AppDelegate
上处理。
为了使应用程序不会崩溃,我认为我需要对下列方法的一些变化:有以下注释行
func saveContext()
lazy var persistentStoreCoordinator: NSPersistentStoreCoordinator?
这些方法调用abort()
功能(默认):
// Replace this implementation with code to handle the error appropriately.
// abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
在发布应用程序之前我应该怎么做才能避免下次更新时发生崩溃?