@@ -74,6 +74,46 @@ Install the fs plugin to get started.
74
74
75
75
</Tabs >
76
76
77
+ ## Configuration
78
+
79
+ ### Android
80
+
81
+ When using the audio, cache, documents, downloads, picture, public or video directories your app must have access to the external storage.
82
+
83
+ Include the following permissions to the ` manifest ` tag in the ` gen/android/app/src/main/AndroidManifest.xml ` file:
84
+
85
+ ``` xml
86
+ <uses-permission android : name =" android.permission.READ_EXTERNAL_STORAGE" />
87
+ <uses-permission android : name =" android.permission.WRITE_EXTERNAL_STORAGE" />
88
+ ```
89
+
90
+ ### iOS
91
+
92
+ Apple requires app developers to specify approved reasons for API usage to enhance user privacy.
93
+
94
+ You must create a ` PrivacyInfo.xcprivacy ` file in the ` src-tauri/gen/apple ` folder
95
+ with the required [ NSPrivacyAccessedAPICategoryFileTimestamp] key and the [ C617.1] recommended reason.
96
+
97
+ ``` xml
98
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
99
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
100
+ <plist version =" 1.0" >
101
+ <dict >
102
+ <key >NSPrivacyAccessedAPITypes</key >
103
+ <array >
104
+ <dict >
105
+ <key >NSPrivacyAccessedAPIType</key >
106
+ <string >NSPrivacyAccessedAPICategoryFileTimestamp</string >
107
+ <key >NSPrivacyAccessedAPITypeReasons</key >
108
+ <array >
109
+ <string >C617.1</string >
110
+ </array >
111
+ </dict >
112
+ </array >
113
+ </dict >
114
+ </plist >
115
+ ```
116
+
77
117
## Usage
78
118
79
119
The fs plugin is available in both JavaScript and Rust.
@@ -670,6 +710,8 @@ use the the object form of permissions `{ "identifier": string, "allow"?: [], "d
670
710
In the above example you can use the [ ` exists ` ] ( #exists ) API using any ` $APPDATA ` sub path (does not include sub-directories)
671
711
and the [ ` rename ` ] ( #rename )
672
712
713
+ [ NSPrivacyAccessedAPICategoryFileTimestamp ] : https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api#4278393
714
+ [ C617.1 ] : https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api#4278393
673
715
[ base directory ] : /reference/javascript/api/namespacepath/#basedirectory
674
716
[ path API ] : reference/javascript/api/namespacepath
675
717
[ @tauri-apps/plugin-fs - Security ] : /reference/javascript/fs/#security
0 commit comments