Sys.io.File text files being erased on mobile

I’m writing to a local text file to save a local copy of some user data in my iphone / android app. Initially I was using SharedObject but it was crashing the app for some reason so I switched to simple text files. Only issue is that a user is complaining that after not using the app for a few days and then re loading it, the data is gone. Does something cause files created with this to be deleted on phones? FYI, going back to SharedObject is not an option at this point – we’re at the point where we’re only doing quick bug fixes.

It really, really depends on the operating system, and the directory you save it to. Most systems have data that might be cleared, and data that is supposed to be persistent for each application (unless the user manually clears that data).

SharedObject really is sys.io.File at heart, just writing to a certain directory. Perhaps you could match the same parent location

I’ve been saving it to File.applicationStorageDirectory. Which seems to be subject to periodic automatic deletions, wherever it happens to be on the Galaxy tablet at least. Hmm.

Hmm, yeah, I guess we use the same on most platforms, but iOS and Android have specific code that uses special app data storage APIs, it seems