Skip to content

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) #1679

Open
@NTass02

Description

@NTass02

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions