I have newer version app to update to app store, but since there were some obsolete data: such as database and some files that I don’t need in the newer build or some databases which are use same name as newer build but the DB structure is different, so is there a way to remove all personal data of last version when user do the update? Then after user updated my app the app feels like a brand-new one.
Share
On app start up you can simply remove the entire store file with something like this.
You can use this code to get the path to the documents directory, if that is where you store the data.
If you do not want to blow away all the data, then you have read in the records you want to delete and then manually remove them.