-1

When I download a file in chrome on my iPad, I can find it afterwards in Files->"On My IPad"->"Chrome".

How can I achieve the same for my WKWebView?

I have tried to save a file at

FileManager.default.urls(for: .documentsDirectory, in: .userDomainMask).first?.appendingPathComponent(filename)

But I can't find the file anywhere. (although it definitely exists since I can read it with same url inside the app).

I also tried .downloadsDirectory and .desktopDirectory

Can you help me?

Halil Ozel
  • 346
  • 1
  • 13
  • 1
    "I can't find the file anywhere" How do you try to find it back? – Larme May 23 '22 at 09:35
  • looked in all the folders in the FILES App, used the search function... How AM i supposed to find it? – Jens Stuber May 23 '22 at 10:36
  • 1
    It’s not in the Files.app, it’s inside your app. – Larme May 23 '22 at 10:37
  • Print `FileManager.default.urls(for: .documentsDirectory, in: .userDomainMask).first`, the "path" should contains your app, not Files.app. Could you enumerate its content with `FileManager` (see https://stackoverflow.com/questions/27721418/getting-list-of-files-in-documents-folder), your file should be there. To have your files inside Files.app see https://stackoverflow.com/questions/70370908/showing-ios-app-files-within-in-the-files-app – Larme May 23 '22 at 11:21

0 Answers0