@@ -16,21 +16,27 @@ Pod::Spec.new do |s|
16
16
17
17
s . source_files = "ios/**/*.{h,m,mm}"
18
18
19
- s . dependency "React-Core"
19
+ # install_modules_dependencies has been defined in RN 0.70
20
+ # This check ensure that the library can work on older versions of RN
21
+ if defined? ( install_modules_dependencies )
22
+ install_modules_dependencies ( s )
23
+ else
24
+ s . dependency "React-Core"
20
25
21
- # Don't install the dependencies when we run `pod install` in the old architecture.
22
- if ENV [ 'RCT_NEW_ARCH_ENABLED' ] == '1' then
23
- s . compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
24
- s . pod_target_xcconfig = {
26
+ # Don't install the dependencies when we run `pod install` in the old architecture.
27
+ if ENV [ 'RCT_NEW_ARCH_ENABLED' ] == '1' then
28
+ s . compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
29
+ s . pod_target_xcconfig = {
25
30
"HEADER_SEARCH_PATHS" => "\" $(PODS_ROOT)/boost\" " ,
26
31
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1" ,
27
32
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
28
- }
29
- s . dependency "React-Codegen"
30
- s . dependency "RCT-Folly"
31
- s . dependency "RCTRequired"
32
- s . dependency "RCTTypeSafety"
33
- s . dependency "ReactCommon/turbomodule/core"
34
- s . dependency "React-RCTFabric"
33
+ }
34
+ s . dependency "React-Codegen"
35
+ s . dependency "RCT-Folly"
36
+ s . dependency "RCTRequired"
37
+ s . dependency "RCTTypeSafety"
38
+ s . dependency "ReactCommon/turbomodule/core"
39
+ s . dependency "React-RCTFabric"
40
+ end
35
41
end
36
42
end
0 commit comments