I’m gonna release a new version of my app. The previous version used some files which in the newer version are changed and need to be processed. I want the older files to be automatically deleted when the user updates the application, otherwise the application sees them and will process them (resulting in an error because the format of the files changed).
Is there an option to do that?
Thank you.
Since you are processing these files, one option is to somehow put the format version in the files or in folder path. Bake that version into a constant in the app.
The app can either always look for those files by appending the constants to the path where you get these files, or look into the data of the file to get the format version and handle it properly (delete, redownload etc…).
Another benefit is that if you release your app and the format version does not change (likely – you just fixed bugs), you don’t have to delete and re-download those files. You also don’t have to change anything or update any routines – simply don’t change the file format constant and it won’t change your files. If you change the format of the files, update that constant and it just works.