fluttercommunity / fluttercommunity/flutter_downloader

download_task.sql created in a public folder

Open
#722 5 comments 0 reactions 1 assignee Claimed by @bartekpacia View on GitHub
bug
Dominant language
Kotlin
Stars
940
Forks
561
Avg merge
1h 18m
Merged PRs (30d)
1

Description

**Describe the bug**
In iOS, we set the download path using [getApplicationDocumentsDirectory()](https://pub.dev/documentation/path_provider/latest/path_provider/getApplicationDocumentsDirectory.html) and apply some configs in order for the downloaded file to be accessible for the user (as described in https://stackoverflow.com/a/56409320).
This method works fine, the file is downloaded and the user can see it and open it.

The problem is that the plugin also creates another file in this directory. This file is download_task.sql and is internal to the plugin, and should not be visible for the user.

I'm not an ios developer myself so I asked an ios developer for an analysis and he said that the plugin is doing some incorrectly:

```

> NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)

should be

> NSArray *paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES)

```

**Device information:**

- Device: iPhone 12 Pro Max
- OS: iOS 15.5
- plugin version 1.8.3+2

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.