@@ -19,18 +19,26 @@ Pod::Spec.new do |s|
19
19
s . dependency "React-Core"
20
20
s . dependency "myTrackerSDK" , '3.2.0'
21
21
22
- # Don't install the dependencies when we run `pod install` in the old architecture.
23
- if ENV [ 'RCT_NEW_ARCH_ENABLED' ] == '1' then
24
- s . compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
25
- s . pod_target_xcconfig = {
26
- "HEADER_SEARCH_PATHS" => "\" $(PODS_ROOT)/boost\" " ,
27
- "OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1" ,
28
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
29
- }
30
- s . dependency "React-Codegen"
31
- s . dependency "RCT-Folly"
32
- s . dependency "RCTRequired"
33
- s . dependency "RCTTypeSafety"
34
- s . dependency "ReactCommon/turbomodule/core"
22
+ # Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
23
+ # See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
24
+ if respond_to? ( :install_modules_dependencies , true )
25
+ install_modules_dependencies ( s )
26
+ else
27
+ s . dependency "React-Core"
28
+
29
+ # Don't install the dependencies when we run `pod install` in the old architecture.
30
+ if ENV [ 'RCT_NEW_ARCH_ENABLED' ] == '1' then
31
+ s . compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
32
+ s . pod_target_xcconfig = {
33
+ "HEADER_SEARCH_PATHS" => "\" $(PODS_ROOT)/boost\" " ,
34
+ "OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1" ,
35
+ "CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
36
+ }
37
+ s . dependency "React-Codegen"
38
+ s . dependency "RCT-Folly"
39
+ s . dependency "RCTRequired"
40
+ s . dependency "RCTTypeSafety"
41
+ s . dependency "ReactCommon/turbomodule/core"
42
+ end
35
43
end
36
44
end
0 commit comments