Closed shiv19 closed 5 years ago
Hmm, interesting one. Can you tell me how you wrote to the fs (a snippet would be helpful) and which platforms are affected?
import { knownFolders } from 'tns-core-modules/file-system';
const documents = knownFolders.documents();
const jsonFile = documents.getFile('/app/something.json');
jsonFile.readText().then(function(content) {}); // for read
jsonFile.writeText(text).then(function() {}); // for write
Something like this. And I realize that files are being written into app folder in this app.
@EddyVerbruggen I believe this affects both Android and iOS since the files are in app folder. But I haven't tested it on iOS
Thanks for the snippet. Looking at this today and reporting my findings here. Note that an iOS sim and device behave differently, so that's why I'll test both of those separately.
Hey @shiv19, can you please give version 1.0.2 a try?
On Android (only) I used to rename the /app
folder to /app_backup
and then rename the folder with the pending update to /app
. So that's why files saved to /app
were lost. I guess if you save to different folders there wouldn't be an issue.
I've now updated the algorithm to instead copy the new files over the current /app
folder, so anything already there won't be removed.
Thanks @EddyVerbruggen I'll give it a try today :)
@EddyVerbruggen It worked! :D Thank you
Woohoo, thx for testing this!
We noticed that after an AppSync update, the files that the app writes to the file system are lost. However, things stored in App-Settings remain intact.