简体   繁体   中英

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. 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. 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. 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. It is entirely your responsibility.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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