Releasing an Update without erasing user data on device
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 219
- Joined: Mon Dec 05, 2011 5:35 pm
Releasing an Update without erasing user data on device
I am about to release an update to an app that has preferences and progress data stored as text files in the documents folder on devices.
It just occurred to me that this might erase all progress data. Actually, I'm not sure if it will or not. I could just release the update and wait for complaints to roll in but I'd rather not. Does anyone know the relationship of an app update on iOS and Andriod and their effect on progress files on the user's device? On second thought, maybe it doesn't overwrite files. Can anyone tell me for certain?
Coffee16
It just occurred to me that this might erase all progress data. Actually, I'm not sure if it will or not. I could just release the update and wait for complaints to roll in but I'd rather not. Does anyone know the relationship of an app update on iOS and Andriod and their effect on progress files on the user's device? On second thought, maybe it doesn't overwrite files. Can anyone tell me for certain?
Coffee16
Last edited by Coffee1633 on Sat Jan 03, 2015 11:11 am, edited 2 times in total.
Re: Releasing an Update without erasing user data on device
Hi,
A current Ios app that I develop can be updated from a server and I understand
the folder documents is not affected.
Did you get an other result ?
best regards
Jean-Marc
A current Ios app that I develop can be updated from a server and I understand
the folder documents is not affected.
Did you get an other result ?
best regards
Jean-Marc
https://alternatic.ch
Re: Releasing an Update without erasing user data on device
from the iOS release notes...
When an application is installed on a phone (or in the simulator) a number of initial folders are created for use by the application. You can locate the paths to these folders using the specialFolderPath() function with the following selectors:
• home – the (unique) folder containing the application bundle and its associated data and folders
• documents – the folder in which the application should store any document data (this folder is backed up by iTunes on sync)
• cache – the folder in which the application should store any transient data that needs to be preserved between launches (this folder is not backed up by iTunes on sync)
• library – the folder in which the application can store data of various types. In particular, data private to the application should be stored in a folder named with the app's bundle identifier inside library. (this folder is backed up by iTunes on sync).
• temporary – the folder in which the application should store any temporary data that is not needed between launches (this folder is not backed up by iTunes on sync)
• engine – the folder containing the built standalone engine (i.e. the bundle). This is useful for constructing paths to resources that have been copied into the bundle at build time. In general you should only create files within the documents, cache, and temporary folders. Indeed, be careful not to change or add any files within the application bundle. The application bundle is digitally signed when it is built, and any changes to it after this point will invalidate the signature
and prevent it from launching.
When an application is installed on a phone (or in the simulator) a number of initial folders are created for use by the application. You can locate the paths to these folders using the specialFolderPath() function with the following selectors:
• home – the (unique) folder containing the application bundle and its associated data and folders
• documents – the folder in which the application should store any document data (this folder is backed up by iTunes on sync)
• cache – the folder in which the application should store any transient data that needs to be preserved between launches (this folder is not backed up by iTunes on sync)
• library – the folder in which the application can store data of various types. In particular, data private to the application should be stored in a folder named with the app's bundle identifier inside library. (this folder is backed up by iTunes on sync).
• temporary – the folder in which the application should store any temporary data that is not needed between launches (this folder is not backed up by iTunes on sync)
• engine – the folder containing the built standalone engine (i.e. the bundle). This is useful for constructing paths to resources that have been copied into the bundle at build time. In general you should only create files within the documents, cache, and temporary folders. Indeed, be careful not to change or add any files within the application bundle. The application bundle is digitally signed when it is built, and any changes to it after this point will invalidate the signature
and prevent it from launching.
-
- VIP Livecode Opensource Backer
- Posts: 219
- Joined: Mon Dec 05, 2011 5:35 pm
Re: Releasing an Update without erasing user data on device
Thank you Dixie and Jean-Marc
After reading Jean-Marc's response, there is still something that puzzles me. Specifically for an Update.
Let's say you wanted to swap out some artwork that is stored in the engine folder. Does the old file in the engine folder get overwritten if you use the same MyImage.png filename? Should you use a different image name? Not sure...
More importantly, what happens to any files in the documents folder, specifically preference and progress files.
After reading Jean-Marc's comment, it is starting to make sense. I guess the documents folder is not touched on an update.
However, now I wonder about the image and audio assets I have. What if I want to swap out a file in the engine folder? Does that get overwritten? Hmm...
After reading Jean-Marc's response, there is still something that puzzles me. Specifically for an Update.
Let's say you wanted to swap out some artwork that is stored in the engine folder. Does the old file in the engine folder get overwritten if you use the same MyImage.png filename? Should you use a different image name? Not sure...
More importantly, what happens to any files in the documents folder, specifically preference and progress files.
After reading Jean-Marc's comment, it is starting to make sense. I guess the documents folder is not touched on an update.
However, now I wonder about the image and audio assets I have. What if I want to swap out a file in the engine folder? Does that get overwritten? Hmm...
Re: Releasing an Update without erasing user data on device
Hi,
The files in the engine folder get replaced completely, because that's where your app is. The files in the documents folder stay on the device, because those are user files, not app files. On mobile devices, this happens automatically and isn't much of an issue. If you have put large files into the documents folder, which become obsolete after an update, you probably should have kept those files in the engine folder.
Kind regards,
Mark
The files in the engine folder get replaced completely, because that's where your app is. The files in the documents folder stay on the device, because those are user files, not app files. On mobile devices, this happens automatically and isn't much of an issue. If you have put large files into the documents folder, which become obsolete after an update, you probably should have kept those files in the engine folder.
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
- VIP Livecode Opensource Backer
- Posts: 219
- Joined: Mon Dec 05, 2011 5:35 pm
Re: Releasing an Update without erasing user data on device
Mark
Thanks, that clears things up.

Thanks for the feedback
Coffee16
Thanks, that clears things up.

No, just put a few preference files and progress data in the docs folder. All the app assets (audio and images) are where they are supposed to be - in the engine folder.If you have put large files into the documents folder, which become obsolete after an update, you probably should have kept those files in the engine folder.
That explains what will happen if I want to swap out images or audio (cause they live in the engine folder).The files in the engine folder get replaced completely

Thanks for the feedback
Coffee16