-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Description
Currently under iOS PathProvider getApplicationDocumentsDirectory method returns the Documents directory.
It should be noted that this is NOT (or at least SHOULD NOT be) the standard path where an iOS app stores its data!
Use this directory (Documents directory - ed.) to store user-generated content. The contents of this directory can be made available to the user through file sharing; therefore, this directory should only contain files that you may wish to expose to the user.
Use the Library subdirectories for any files you don’t want exposed to the user. Your app should not use these directories for user data files.
Content in both directories is automatically backed up by iCloud.
BTW, It's currently very easy to access this directory (documents + '../Library') but the workaround is system-specific and not really future-proof.
As Android doesn't differentiate between the two, I think we can safely add a getApplicationLibraryDirectory that returns the AppData dir (the same as getApplicationDocumentsDirectory) under Android and the Library dir under iOS.
Maybe this is not ideal, but at least won't break BC.
I can provide a PR if the maintainer likes this approach.