expo-file-system 16.0.7 → 16.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -10,12 +10,23 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 16.0.9 — 2024-04-15
14
+
15
+ ### 💡 Others
16
+
17
+ - [iOS] Add privacy manifest describing required reason API usage. ([#27770](https://github.com/expo/expo/pull/27770) by [@aleqsio](https://github.com/aleqsio))
18
+
19
+ ## 16.0.8 — 2024-03-07
20
+
21
+ _This version does not introduce any user-facing changes._
22
+
13
23
  ## 16.0.7 — 2024-02-27
14
24
 
15
25
  ### 🐛 Bug fixes
16
26
 
17
27
  - [iOS] Fix downloadAsync for local files. ([#27187](https://github.com/expo/expo/pull/27187) by [@gabrieldonadel](https://github.com/gabrieldonadel))
18
28
  - On `iOS`, fix an issue with `copyAsync` where the copy fails if it is a photo library asset. ([#27208](https://github.com/expo/expo/pull/27208) by [@alanjhughes](https://github.com/alanjhughes))
29
+ - On `iOS`, resolve the promise manually after copying a PHAsset file. ([#27381](https://github.com/expo/expo/pull/27381) by [@alanjhughes](https://github.com/alanjhughes))
19
30
 
20
31
  ## 16.0.6 — 2024-02-06
21
32
 
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
3
3
  apply plugin: 'maven-publish'
4
4
 
5
5
  group = 'host.exp.exponent'
6
- version = '16.0.7'
6
+ version = '16.0.9'
7
7
 
8
8
  def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
9
9
  if (expoModulesCorePlugin.exists()) {
@@ -94,7 +94,7 @@ android {
94
94
  namespace "expo.modules.filesystem"
95
95
  defaultConfig {
96
96
  versionCode 30
97
- versionName "16.0.7"
97
+ versionName "16.0.9"
98
98
  }
99
99
  }
100
100
 
@@ -23,6 +23,7 @@
23
23
  result[@"exists"] = @(YES);
24
24
  result[@"isDirectory"] = @(NO);
25
25
  result[@"uri"] = fileUri;
26
+ // Uses required reason API based on the following reason: 3B52.1
26
27
  result[@"modificationTime"] = @(asset.modificationDate.timeIntervalSince1970);
27
28
  if (options[@"md5"] || options[@"size"]) {
28
29
  [[PHImageManager defaultManager] requestImageDataAndOrientationForAsset:asset options:nil resultHandler:^(NSData * _Nullable imageData, NSString * _Nullable dataUTI, CGImagePropertyOrientation orientation, NSDictionary * _Nullable info) {
@@ -21,6 +21,7 @@
21
21
  result[@"md5"] = [[NSData dataWithContentsOfFile:path] md5String];
22
22
  }
23
23
  result[@"size"] = @([EXFileSystemLocalFileHandler getFileSize:path attributes:attributes]);
24
+ // Uses required reason API based on the following reason: 0A2A.1
24
25
  result[@"modificationTime"] = @(attributes.fileModificationDate.timeIntervalSince1970);
25
26
  resolve(result);
26
27
  } else {
@@ -26,6 +26,8 @@ Pod::Spec.new do |s|
26
26
  'DEFINES_MODULE' => 'YES'
27
27
  }
28
28
 
29
+ s.resource_bundles = {'ExpoFileSystem_privacy' => ['PrivacyInfo.xcprivacy']}
30
+
29
31
  s.source_files = "**/*.{h,m,swift}"
30
32
 
31
33
  s.exclude_files = 'Tests/'
@@ -92,6 +92,7 @@ internal func copyPHAsset(fromUrl: URL, toUrl: URL, with resourceManager: PHAsse
92
92
  if let error {
93
93
  promise.reject(FailedToCopyAssetException(fromUrl.absoluteString))
94
94
  }
95
+ promise.resolve()
95
96
  }
96
97
  } else {
97
98
  promise.reject(FailedToCopyAssetException(fromUrl.absoluteString))
@@ -256,6 +256,7 @@ public final class FileSystemModule: Module {
256
256
  }
257
257
 
258
258
  AsyncFunction("getFreeDiskStorageAsync") { () -> Int in
259
+ // Uses required reason API based on the following reason: E174.1 85F4.1
259
260
  let resourceValues = try getResourceValues(from: documentDirectory, forKeys: [.volumeAvailableCapacityKey])
260
261
 
261
262
  guard let availableCapacity = resourceValues?.volumeAvailableCapacity else {
@@ -265,6 +266,7 @@ public final class FileSystemModule: Module {
265
266
  }
266
267
 
267
268
  AsyncFunction("getTotalDiskCapacityAsync") { () -> Int in
269
+ // Uses required reason API based on the following reason: E174.1 85F4.1
268
270
  let resourceValues = try getResourceValues(from: documentDirectory, forKeys: [.volumeTotalCapacityKey])
269
271
 
270
272
  guard let totalCapacity = resourceValues?.volumeTotalCapacity else {
@@ -0,0 +1,34 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>NSPrivacyCollectedDataTypes</key>
6
+ <array>
7
+ </array>
8
+ <key>NSPrivacyTracking</key>
9
+ <false/>
10
+ <key>NSPrivacyTrackingDomains</key>
11
+ <array/>
12
+ <key>NSPrivacyAccessedAPITypes</key>
13
+ <array>
14
+ <dict>
15
+ <key>NSPrivacyAccessedAPIType</key>
16
+ <string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
17
+ <key>NSPrivacyAccessedAPITypeReasons</key>
18
+ <array>
19
+ <string>0A2A.1</string>
20
+ <string>3B52.1</string>
21
+ </array>
22
+ </dict>
23
+ <dict>
24
+ <key>NSPrivacyAccessedAPIType</key>
25
+ <string>NSPrivacyAccessedAPICategoryDiskSpace</string>
26
+ <key>NSPrivacyAccessedAPITypeReasons</key>
27
+ <array>
28
+ <string>E174.1</string>
29
+ <string>85F4.1</string>
30
+ </array>
31
+ </dict>
32
+ </array>
33
+ </dict>
34
+ </plist>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-file-system",
3
- "version": "16.0.7",
3
+ "version": "16.0.9",
4
4
  "description": "Provides access to the local file system on the device.",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -41,5 +41,5 @@
41
41
  "peerDependencies": {
42
42
  "expo": "*"
43
43
  },
44
- "gitHead": "e94e2aac39cbb7f8788869cd6798bbdeadc58f42"
44
+ "gitHead": "88a8226609b870c0635c39da43ac8306c4dc7031"
45
45
  }