Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/105.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
IOS应用程序更新核心数据_Ios_Core Data - Fatal编程技术网

IOS应用程序更新核心数据

IOS应用程序更新核心数据,ios,core-data,Ios,Core Data,我想知道我是否对我的应用程序进行了更新,如果用户有东西在里面,它会覆盖核心数据数据库吗,还是只保留数据库?我想确保它不会删除用户保存的任何内容。我必须复制它还是只在更新时保留它?检查代码中是否有以下调用(给NSPersistentStoreCoordinator): addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:options error:&error] 如果上述调

我想知道我是否对我的应用程序进行了更新,如果用户有东西在里面,它会覆盖核心数据数据库吗,还是只保留数据库?我想确保它不会删除用户保存的任何内容。我必须复制它还是只在更新时保留它?

检查代码中是否有以下调用(给NSPersistentStoreCoordinator):

addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:options error:&error]

如果上述调用中的storeURL指向文档目录中的文件(应该是该文件),则升级将不会触及您的数据库。

通常它会留在那里。但是您应该提供一些存储文件保存位置的详细信息。。。