ionic-team / ionic-team/capacitor-filesystem

Filesystem on iOS deletes the files in the Documents directory and External Storage directory when deleting the app (documentation says files in these locations should persist)

Open
#32 3 comments 0 reactions 0 assignees View on GitHub
documentation
Dominant language
TypeScript
Stars
6
Forks
15
Avg merge
14m
Merged PRs (30d)
1

Description

## Bug Report

### Plugin(s)
Capacitor Filesystem

### Capacitor Version

```
Latest Dependencies:

@capacitor/cli: 5.1.1
@capacitor/core: 5.1.1
@capacitor/android: 5.1.1
@capacitor/ios: 5.1.1

Installed Dependencies:

@capacitor/cli: 5.0.5
@capacitor/core: 5.0.5
@capacitor/android: 5.0.5
@capacitor/ios: 5.0.5
```

### Platform(s)
iOS 16 and other versions, as well

### Current Behavior
When saving a file to Directory.Documents or Directory.ExternalStorage on iOS, they are being stored to a folder with the name of the app instead of right inside the Documents folder. When the app is deleted, the folder and files within are also delete.

### Expected Behavior
With Directory.Documents and Directory.ExternalStorage, they are supposed to persist.

### Code Reproduction

```
const options: WriteFileOptions = {
path: 'test.pdf',
data: data,
directory: Directory.Documents,
}

return Filesystem.writeFile(options)
```

### Other Technical Details
Using Filesystem plugin with Ionic and Vue 3

### Additional Context

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.