From 0738293db8eca05115c35adad1a4c45f40d74dbd Mon Sep 17 00:00:00 2001 From: Nik Graf Date: Fri, 25 Oct 2024 06:45:01 +0100 Subject: [PATCH] chore: upgrade podspec --- example/ios/Podfile.lock | 7 +++--- react-native-libsodium.podspec | 41 +++++++++++++++++++--------------- 2 files changed, 27 insertions(+), 21 deletions(-) diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index fb189f0..adb717d 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -329,7 +329,8 @@ PODS: - React-jsinspector (0.71.6) - React-logger (0.71.6): - glog - - react-native-libsodium (1.1.2): + - react-native-libsodium (1.4.0): + - RCT-Folly (= 2021.07.22.00) - React-Core - React-perflogger (0.71.6) - React-RCTActionSheet (0.71.6): @@ -606,7 +607,7 @@ SPEC CHECKSUMS: React-jsiexecutor: 7894956638ff3e00819dd3f9f6f4a84da38f2409 React-jsinspector: d5ce2ef3eb8fd30c28389d0bc577918c70821bd6 React-logger: 9332c3e7b4ef007a0211c0a9868253aac3e1da82 - react-native-libsodium: 070bd408c7ccf5ca931077aeb4277f0929299bc1 + react-native-libsodium: 9fa41404dbcff7a782bec055851dc5d465a2c817 React-perflogger: 43392072a5b867a504e2b4857606f8fc5a403d7f React-RCTActionSheet: c7b67c125bebeda9fb19fc7b200d85cb9d6899c4 React-RCTAnimation: c2de79906f607986633a7114bee44854e4c7e2f5 @@ -626,4 +627,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 5be6ef07a456272805e0682c059fca55e556bcd6 -COCOAPODS: 1.11.3 +COCOAPODS: 1.15.2 diff --git a/react-native-libsodium.podspec b/react-native-libsodium.podspec index 617e8a4..deb2f75 100644 --- a/react-native-libsodium.podspec +++ b/react-native-libsodium.podspec @@ -11,28 +11,33 @@ Pod::Spec.new do |s| s.license = package["license"] s.authors = package["author"] - s.platforms = { :ios => "11.0" } + s.platforms = { :ios => min_ios_version_supported } s.source = { :git => "https://github.com/serenity-kit/react-native-libsodium.git", :tag => "#{s.version}" } - s.source_files = "ios/**/*.{h,m,mm}", "cpp/**/*.{h,cpp}" + s.source_files = "ios/**/*.{h,m,mm}", "cpp/**/*.{hpp,cpp,c,h}" s.vendored_frameworks = "libsodium/build/libsodium-apple/Clibsodium.xcframework" - s.dependency "React-Core" - - # Don't install the dependencies when we run `pod install` in the old architecture. - if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then - s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1" - s.pod_target_xcconfig = { - "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"", - "OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1", - "CLANG_CXX_LANGUAGE_STANDARD" => "c++17" - } - s.dependency "React-Codegen" - s.dependency "RCT-Folly" - s.dependency "RCTRequired" - s.dependency "RCTTypeSafety" - s.dependency "ReactCommon/turbomodule/core" + # Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0. + # See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79. + if respond_to?(:install_modules_dependencies, true) + install_modules_dependencies(s) + else + s.dependency "React-Core" + + # Don't install the dependencies when we run `pod install` in the old architecture. + if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then + s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1" + s.pod_target_xcconfig = { + "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"", + "OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1", + "CLANG_CXX_LANGUAGE_STANDARD" => "c++17" + } + s.dependency "React-Codegen" + s.dependency "RCT-Folly" + s.dependency "RCTRequired" + s.dependency "RCTTypeSafety" + s.dependency "ReactCommon/turbomodule/core" + end end - end