-
Notifications
You must be signed in to change notification settings - Fork 20
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
Labels
bug
Something isn't working
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The text was updated successfully, but these errors were encountered: