Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persistent Storage uses caches/document directory #104

Open
tcldr opened this issue Dec 16, 2023 · 1 comment
Open

Persistent Storage uses caches/document directory #104

tcldr opened this issue Dec 16, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@tcldr
Copy link

tcldr commented Dec 16, 2023

Expected Behavior

Application data should be stored in the application support directory reachable via FileManager.SearchPathDirectory.applicationSupportDirectory.

Current Behavior

Application data is being saved to either the user's document directory or the caches directory. The document's directory is less than ideal as it clutters up user space. The caches directory is also problematic as it can be purged by the system.

Possible Solution

Use the application support directory (FileManager.SearchPathDirectory.applicationSupportDirectory). On macOS, it's the ~/Library/Application Support directory. On iOS and other platforms it's app specific, but serves the same purpose.

Furthermore, you can mark a directory/file to be excluded from iCloud backup by setting attributes at the point of creation. More info here: Mark Nonpurgeable Data as Excludable

I've created a PR you can reference

@tcldr
Copy link
Author

tcldr commented May 16, 2024

Hi guys, any update on this? @justin-fiedler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant