0

I have a very lightweight app (~10MB) but some iOS users started reporting that the app has accumulated over 1GB of "Documents & Data".

It's a daily news app - people open it once a day, see some news and 1-2 image banners and that's it. I don't store anything on purpose and I'm not sure what this documents and data might be but I want to remove it - either automatically or by providing and option to the users so they can do it themselves. Is that possible? Or is it at least possible to see what this data might be?

Edit: I searched through the FileSystem.documentDirectory but it's empty. I also checked FileSystem.cacheDirectory and it only has 7 .ttf files.

isHristov
  • 1,546
  • 2
  • 16
  • 18

1 Answers1

0

Here is en example how to delete a folder

This should delete the whole folder:


//Or FileSystem.cacheDirectory
FileSystem.readDirectoryAsync(FileSystem.documentDirectory).then((response) => {
    for (const dir of response) {
        FileSystem.deleteAsync(dir);
    }
});

Michael Bahl
  • 2,941
  • 1
  • 13
  • 16