Hi All,
I have an app that uses coredata as a database. The database is downloaded from the cloud so it's really not important to me to migrate the old data from one version to the next because the user can't modify the fields, just search and filter trough them.
Recently I have updated the app and added a few fields to the database. I didn't do any lightweight migration thinking that if anyway I delete the database on startup and start a new one there wouldn't be problem.
But For those users who update the app, the app crashes. So far I instructed users to delete the app and re-downloaded it from the app store. This solves the problem, but it's really not professional. And most users don't contact me, the app just crashes on startup and they let it be (because of the automatic app update feature they don't even know the problem is with the new version).
I have two questions related of how to go about and solving this:
1. since I don't need the old data (I can just download it again from the cloud) is there anyway to just completely delete the old database before the application crashes and rebuilt it again using the new structure (without doing the lightweight migration)?
2. If not, how can I do a lightweight migration retroactively? I have looked at the tutorial online, and its pretty much straight forward, but how to employ the lightweight migration from the previous version (1.2) which is no longer available on my development machine to next version I will release for the fix (1.4)? (where 1.3 is the problematic version currently on the app store that crashes when updated).
Thank you all.
I have an app that uses coredata as a database. The database is downloaded from the cloud so it's really not important to me to migrate the old data from one version to the next because the user can't modify the fields, just search and filter trough them.
Recently I have updated the app and added a few fields to the database. I didn't do any lightweight migration thinking that if anyway I delete the database on startup and start a new one there wouldn't be problem.
But For those users who update the app, the app crashes. So far I instructed users to delete the app and re-downloaded it from the app store. This solves the problem, but it's really not professional. And most users don't contact me, the app just crashes on startup and they let it be (because of the automatic app update feature they don't even know the problem is with the new version).
I have two questions related of how to go about and solving this:
1. since I don't need the old data (I can just download it again from the cloud) is there anyway to just completely delete the old database before the application crashes and rebuilt it again using the new structure (without doing the lightweight migration)?
2. If not, how can I do a lightweight migration retroactively? I have looked at the tutorial online, and its pretty much straight forward, but how to employ the lightweight migration from the previous version (1.2) which is no longer available on my development machine to next version I will release for the fix (1.4)? (where 1.3 is the problematic version currently on the app store that crashes when updated).
Thank you all.