Hi, my mobile app currently downloads some images to the Application Data Directory. These images are displayed correctly in ImageViews and this works fine when the app is closed and restarted.
However, when I update the app, by doing a rebuild in Titanium, these images are not saved.
The documentation for the desktop API states:
"The data directory is per-user directory for storing application data. It is guaranteed to be writable and stable between releases."
But the mobile API doesn't mention stable storage.
Does anyone know how to make these download files persistent between releases and updated?
Thanks for your help.
I'm not entirely sure about this, but I used restart my Appcelerator apps by clicking "stop" in Titanium Developer and then hitting "launch". I noticed that by doing that, the simulator would occasionally create a new data directory for my app, which would make it appear that the state had not been persisted.
Now, when I want to restart an app I exit the app in the simulator, then hit "launch" in Titanium Developer. Doing that, the app always has the same state directory and everything works as described.
Never seen this problem with an actual on-device install/upgrade either. Think it's just an issue of the simulator generating a random app id for state.
Out of curiosity, how big are your images and how long does it take to write them to disk? I'm having an issue where writing images to disk takes a VERY long time.