Copy link to clipboard
Copied
I want to save user score, tried shared objects and also file save(in both applicationStorage and Documents directory) but the data is deleted on game unistall or update.
I think that should only happen while you are testing, because Flash is effectively deleting the old app before installing the update. The App Store doesn’t work quite the same way.
The timing was good for this question, I just had an app update go live in the app store. Sure enough, the shared object data I had saved in the previous version was still there in the updated version.
Copy link to clipboard
Copied
I think that should only happen while you are testing, because Flash is effectively deleting the old app before installing the update. The App Store doesn’t work quite the same way.
The timing was good for this question, I just had an app update go live in the app store. Sure enough, the shared object data I had saved in the previous version was still there in the updated version.
Copy link to clipboard
Copied
Thank you for the answer. I did some research these days and I found the same answer, that the data persists after update(I know that installing new version from flash is actually unistall and install rather than update). Problem is that, I want to keep the data even after a reinstall. I tried Documents directory but looks like it's the App's documents directory, not phone's directory. The only way I can think of is to use cloud for permanent save but this is not an option. Also, another problem is that some of my users reported that their data is deleted even if they just close and re open the game, with no reinstall(maybe old iOS version that is not really compatible with all Air functions).
Anyway, I'll stick to the current method, if the update persists after App Store update, it should be fine. For really permanent persist I may add cloud backup(people don't really like it, but if they really want permanent save then they should not complain).
Thanks again for letting me know for sure that the data will be still there after update. Good luck with your app, hope it roars up in the top
Copy link to clipboard
Copied
Something else to know, if iOS runs low on storage, writing data fails. Always use try/catch when saving shared objects, otherwise you’ll get program errors. You could go to the trouble of detecting when a write has failed, and you could forewarn the user that their recent changes won’t have saved, and that they should free up some storage.
Under iOS 8 that warning is automatic. I’m constantly seeing a dialog where the OS is telling me that games may not be able to do a save.