expo-file-system 16.0.2 → 16.0.4

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,6 +10,16 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 16.0.4 — 2024-01-18
14
+
15
+ _This version does not introduce any user-facing changes._
16
+
17
+ ## 16.0.3 — 2024-01-10
18
+
19
+ ### 🎉 New features
20
+
21
+ - Added support for macOS platform. ([#26253](https://github.com/expo/expo/pull/26253) by [@tsapeta](https://github.com/tsapeta))
22
+
13
23
  ## 16.0.2 — 2023-12-19
14
24
 
15
25
  _This version does not introduce any user-facing changes._
@@ -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.2'
6
+ version = '16.0.4'
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.2"
97
+ versionName "16.0.4"
98
98
  }
99
99
  }
100
100
 
@@ -1,7 +1,6 @@
1
1
  {
2
- "name": "expo-file-system",
3
- "platforms": ["ios", "android"],
4
- "ios": {
2
+ "platforms": ["apple", "android"],
3
+ "apple": {
5
4
  "modules": ["FileSystemModule"],
6
5
  "appDelegateSubscribers": ["FileSystemBackgroundSessionHandler"]
7
6
  },
@@ -5,7 +5,12 @@
5
5
  #import <ExpoFileSystem/EXFileSystem.h>
6
6
 
7
7
  #import <CommonCrypto/CommonDigest.h>
8
+
9
+ #if TARGET_OS_IOS || TARGET_OS_TV
8
10
  #import <MobileCoreServices/MobileCoreServices.h>
11
+ #elif TARGET_OS_OSX
12
+ #import <CoreServices/CoreServices.h>
13
+ #endif
9
14
 
10
15
  #import <ExpoFileSystem/EXFileSystemLocalFileHandler.h>
11
16
  #import <ExpoFileSystem/EXFileSystemAssetLibraryHandler.h>
@@ -25,7 +25,7 @@
25
25
  result[@"uri"] = fileUri;
26
26
  result[@"modificationTime"] = @(asset.modificationDate.timeIntervalSince1970);
27
27
  if (options[@"md5"] || options[@"size"]) {
28
- [[PHImageManager defaultManager] requestImageDataForAsset:asset options:nil resultHandler:^(NSData * _Nullable imageData, NSString * _Nullable dataUTI, UIImageOrientation orientation, NSDictionary * _Nullable info) {
28
+ [[PHImageManager defaultManager] requestImageDataAndOrientationForAsset:asset options:nil resultHandler:^(NSData * _Nullable imageData, NSString * _Nullable dataUTI, CGImagePropertyOrientation orientation, NSDictionary * _Nullable info) {
29
29
  result[@"size"] = @(imageData.length);
30
30
  if (options[@"md5"]) {
31
31
  result[@"md5"] = [imageData md5String];
@@ -84,7 +84,7 @@
84
84
  [EXFileSystemAssetLibraryHandler copyData:data toPath:toPath resolver:resolve rejecter:reject];
85
85
  }];
86
86
  } else {
87
- [[PHImageManager defaultManager] requestImageDataForAsset:asset options:nil resultHandler:^(NSData * _Nullable imageData, NSString * _Nullable dataUTI, UIImageOrientation orientation, NSDictionary * _Nullable info) {
87
+ [[PHImageManager defaultManager] requestImageDataAndOrientationForAsset:asset options:nil resultHandler:^(NSData * _Nullable imageData, NSString * _Nullable dataUTI, CGImagePropertyOrientation orientation, NSDictionary * _Nullable info) {
88
88
  [EXFileSystemAssetLibraryHandler copyData:imageData toPath:toPath resolver:resolve rejecter:reject];
89
89
  }];
90
90
  }
@@ -110,10 +110,12 @@
110
110
  hasWarned = YES;
111
111
  }
112
112
  return nil;
113
- #else
113
+ #elif TARGET_OS_IOS || TARGET_OS_TV
114
114
  // This is the older, deprecated way of fetching assets from assets-library
115
115
  // using the "assets-library://" protocol
116
116
  return [PHAsset fetchAssetsWithALAssetURLs:@[url] options:nil];
117
+ #elif TARGET_OS_OSX
118
+ return nil;
117
119
  #endif
118
120
  }
119
121
 
@@ -1,8 +1,8 @@
1
1
  // Copyright 2015-present 650 Industries. All rights reserved.
2
2
 
3
3
  #import <Foundation/Foundation.h>
4
+ #import <ExpoModulesCore/Platform.h>
4
5
  #import <ExpoModulesCore/EXSingletonModule.h>
5
- #import <UIKit/UIKit.h>
6
6
 
7
7
  NS_ASSUME_NONNULL_BEGIN
8
8
 
@@ -10,7 +10,11 @@ Pod::Spec.new do |s|
10
10
  s.license = package['license']
11
11
  s.author = package['author']
12
12
  s.homepage = package['homepage']
13
- s.platforms = { :ios => '13.4', :tvos => '13.4'}
13
+ s.platforms = {
14
+ :ios => '13.4',
15
+ :osx => '10.15',
16
+ :tvos => '13.4'
17
+ }
14
18
  s.swift_version = '5.4'
15
19
  s.source = { :git => 'https://github.com/expo/expo.git' }
16
20
  s.static_framework = true
@@ -19,7 +19,9 @@ public final class FileSystemBackgroundSessionHandler: ExpoAppDelegateSubscriber
19
19
 
20
20
  // MARK: - ExpoAppDelegateSubscriber
21
21
 
22
+ #if os(iOS) || os(tvOS)
22
23
  public func application(_ application: UIApplication, handleEventsForBackgroundURLSession identifier: String, completionHandler: @escaping () -> Void) {
23
24
  completionHandlers[identifier] = completionHandler
24
25
  }
26
+ #endif
25
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-file-system",
3
- "version": "16.0.2",
3
+ "version": "16.0.4",
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": "43f1b4f8a5a9bca649e4e7ca6e4155482a162431"
44
+ "gitHead": "102899632731658eecba006c0d1c79b98ba8f5f7"
45
45
  }