@@ -11,28 +11,33 @@ Pod::Spec.new do |s|
1111 s . license = package [ "license" ]
1212 s . authors = package [ "author" ]
1313
14- s . platforms = { :ios => "11.0" }
14+ s . platforms = { :ios => min_ios_version_supported }
1515 s . source = { :git => "https://github.com/serenity-kit/react-native-libsodium.git" , :tag => "#{ s . version } " }
1616
17- s . source_files = "ios/**/*.{h,m,mm}" , "cpp/**/*.{h ,cpp}"
17+ s . source_files = "ios/**/*.{h,m,mm}" , "cpp/**/*.{hpp ,cpp,c,h }"
1818
1919 s . vendored_frameworks = "libsodium/build/libsodium-apple/Clibsodium.xcframework"
2020
21- s . dependency "React-Core"
22-
23- # Don't install the dependencies when we run `pod install` in the old architecture.
24- if ENV [ 'RCT_NEW_ARCH_ENABLED' ] == '1' then
25- s . compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
26- s . pod_target_xcconfig = {
27- "HEADER_SEARCH_PATHS" => "\" $(PODS_ROOT)/boost\" " ,
28- "OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1" ,
29- "CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
30- }
31- s . dependency "React-Codegen"
32- s . dependency "RCT-Folly"
33- s . dependency "RCTRequired"
34- s . dependency "RCTTypeSafety"
35- s . dependency "ReactCommon/turbomodule/core"
21+ # Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
22+ # See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
23+ if respond_to? ( :install_modules_dependencies , true )
24+ install_modules_dependencies ( s )
25+ else
26+ s . dependency "React-Core"
27+
28+ # Don't install the dependencies when we run `pod install` in the old architecture.
29+ if ENV [ 'RCT_NEW_ARCH_ENABLED' ] == '1' then
30+ s . compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
31+ s . pod_target_xcconfig = {
32+ "HEADER_SEARCH_PATHS" => "\" $(PODS_ROOT)/boost\" " ,
33+ "OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1" ,
34+ "CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
35+ }
36+ s . dependency "React-Codegen"
37+ s . dependency "RCT-Folly"
38+ s . dependency "RCTRequired"
39+ s . dependency "RCTTypeSafety"
40+ s . dependency "ReactCommon/turbomodule/core"
41+ end
3642 end
37-
3843end
0 commit comments