fluttercommunity / fluttercommunity/flutter_downloader

add option to change download_tasks.sql path to NSLibraryDirectory on ios

Open
#316 2 comments 2 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
940
Forks
561
Avg merge
1h 18m
Merged PRs (30d)
1

Description

### Problem

Currently the download_tasks.sql file is stored in the documents directory on iOS. When one uses [UIFileSharingEnabled ](https://medium.com/@sasude9/download-files-in-files-app-in-ios-11-b676b89cf6be) for example to make downloaded files available in the Files app, download_tasks.sql also show up in that directory. According to [Apple](https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html) one shouldn't store none-user files in the DocumentDirectory. Instead the NSLibraryDirectory is recommended. Moreover the flutter `path_provider` package suggest to use `getLibraryDirectory` for database files.

![photo5228850717417123257](https://user-images.githubusercontent.com/33162310/87773795-f3ec9480-c823-11ea-8edf-e24d52f37bf2.jpg)

### Solution

I suggest to give users the option to specify where they want to store the database file.

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.