alpha0010 / react-native-file-access

Filesystem access for React Native
MIT License
298 stars 18 forks source link

Compiling for iOS 10.0 error #51

Closed christophemarois closed 2 years ago

christophemarois commented 2 years ago

Hi! This issue is related to #44. Encountered an error compiling in Xcode 13.4

Compiling for iOS 10.0, but module 'ZIPFoundation' has a minimum deployment target of iOS 12.0

As I understand, ZIPFoundation 0.9.12 requires iOS 12.0 and 0.9.11 requires iOS 11.0. Since this lib specified s.dependency "ZIPFoundation", "< 0.9.12", I bumped the ios platform requirement to 11.0 and it fixed my issue

Here is the diff that solved my problem (disregard the podfile version bump):

diff --git a/node_modules/react-native-file-access/react-native-file-access.podspec b/node_modules/react-native-file-access/react-native-file-access.podspec
index 919300c..c69ef5f 100644
--- a/node_modules/react-native-file-access/react-native-file-access.podspec
+++ b/node_modules/react-native-file-access/react-native-file-access.podspec
@@ -4,17 +4,18 @@ package = JSON.parse(File.read(File.join(__dir__, "package.json")))

 Pod::Spec.new do |s|
   s.name         = "react-native-file-access"
-  s.version      = package["version"]
+  # s.version      = package["version"]
+  s.version      = "2.4.2.patch-1" # just to refresh cocoapods
   s.summary      = package["description"]
   s.homepage     = package["homepage"]
   s.license      = package["license"]
   s.authors      = package["author"]

-  s.platforms    = { :ios => "10.0", :osx => "10.10" }
+  s.platforms    = { :ios => "11.0", :osx => "10.10" }
   s.source       = { :git => "https://github.com/alpha0010/react-native-file-access.git", :tag => "#{s.version}" }

   s.source_files = "ios/**/*.{h,m,mm,swift}"

   s.dependency "React-Core"
-  s.dependency "ZIPFoundation", "< 0.9.12"
+  s.dependency "ZIPFoundation", "0.9.11"
 end

This issue body was partially generated by patch-package.

alpha0010 commented 2 years ago

Thanks for the patch. Strange that cocoapods is having these dependency resolution issues. Deployed in v2.4.3.