简体   繁体   English

如何在iOS中更新应用程序时如何避免数据丢失?

[英]how i can avoid my data lost when i updates my apps in iOS?

When using PhoneGap, do users lose all of their saved data when they update an iOS app downloaded from iTunes? 使用PhoneGap时,用户更新从iTunes下载的iOS应用程序时是否会丢失所有保存的数据?

I am hoping that anything stored in either Webstorage feature in Construct 2 will be preserved whenever someone downloads a new version of the app from iTunes, but I'm afraid to build a whole Apps only to have a bunch of upset users when they update the app. 我希望每当有人从iTunes下载新版本的应用程序时,构造2中任一Webstorage功能中存储的任何内容都将被保留,但是我担心要构建一个完整的应用程序,而当用户更新该应用程序时会遇到很多烦恼应用程式。 I know when I build an app in Objective CI have to go through some hoops to get the Core Data store to migrate correctly. 我知道当我在Objective CI中构建应用程序时必须经历一些麻烦才能使Core Data存储正确迁移。

The other option is to mirror the data to an external server/database, but I want to avoid that expense and complication if I can. 另一个选择是将数据镜像到外部服务器/数据库,但我想避免这种开销和复杂性。

If you change anything in the tables in CoreData then you would have to implement migration for the tables by creating a new version (check apple's documentation here: Lightweight Migration ) 如果您在CoreData中更改了表中的任何内容,则必须通过创建新版本来实现表的迁移(请在此处查看Apple的文档: 轻型迁移

Otherwise if you don't change anything updating the app would not make the user lose any data. 否则,如果您不进行任何更改,则更新应用程序不会使用户丢失任何数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM