简体   繁体   English

当用户 go 到 AppStore 更新应用程序时,如何删除用户以前版本的 ios 应用程序

[英]How can I delete the user's previous version of ios app when user go to AppStore update the app

I have a ios app in AppStore and I want to upload a new version.我在 AppStore 中有一个 ios 应用程序,我想上传一个新版本。 But the problem is there is a database in app, and I set the different table structure in new version, so if user already have the previous version app and then download the new version, It will got some error because of the database modified structure.但是问题是app里面有一个数据库,我在新版本中设置了不同的表结构,所以如果用户已经有以前版本的app,然后下载新版本,由于数据库结构修改,会出现一些错误。 So I want to know if there is any way that can prevent this situation in App Store Connection, like auto delete the previous version and then reinstall the new version when user update the app.所以我想知道是否有任何方法可以防止App Store Connection中出现这种情况,比如在用户更新应用程序时自动删除以前的版本,然后重新安装新版本。 Please help me, thanks.请帮助我,谢谢。

This is a common situation.这是一种常见的情况。 You have to write migration code that will detect the old existing database and modify it, converting it to the new structure.您必须编写迁移代码来检测旧的现有数据库并对其进行修改,将其转换为新结构。 Typically you'll do this at launch time on a background thread.通常,您会在启动时在后台线程上执行此操作。

So this has nothing to do with the overall app installation or with the App Store.因此,这与整体应用程序安装或 App Store 无关。 It is entirely your responsibility.这完全是你的责任。

暂无
暂无

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

相关问题 Facebook iOS SDK v3.1:当其他用户登录Facebook时,如何注销应用程序中的上一个用户? - Facebook iOS SDK v3.1: How can I logout the previous user in my app when a different user logs in at Facebook? 当新版本上传到 appstore/playstore 时,如何使用 flutter 以编程方式更新 android/ios 应用程序 - How to update android/ios app programatically with flutter when new version uploaded in to appstore/playstore 如何访问我们的iOS应用程序的用户数据? - How can I access a user's data for our iOS app? 当 AppStore 中有新版本时,如何更新基于 Cordova 的应用程序? - How to update Cordova Based App when new version is Available in AppStore? iOS - 提示用户更新到最新的应用版本 - iOS - Prompt User to Update to Latest App Version 发布的 AppStore 应用程序是否会通过通知用户在 iOS 上更新他们的应用程序来取代 Testflight 应用程序? - Will the released AppStore app replace Testflight app by notifying the user to update their app on iOS? 用户注销时如何将iOS应用重置为初始状态 - how can I reset an iOS app to it's initial state when the user logs out 我希望我的iOS应用每2分钟更新一次用户在服务器上的位置,无论用户的动作或位置如何。 我该怎么做? - I want my iOS app to update user's location on the server every 2 minutes, regardless of the user's motion or position. How can I do it? 如何知道用户是否在appstore上评了app - How to know whether user rated app on appstore 我可以知道用户何时删除我的应用程序? - Can I know when the user delete my app?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM