Skip to content

Commit 711312c

Browse files
authored
Update AmplifyRTNCore.podspec (#14493)
1 parent 2a3f438 commit 711312c

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

packages/react-native/AmplifyRTNCore.podspec

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,24 @@ Pod::Spec.new do |s|
1818

1919
s.dependency "React-Core"
2020

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 = {
25-
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
26-
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
27-
"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"
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+
# 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 = {
30+
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
31+
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
32+
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
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+
end
3440
end
3541
end

0 commit comments

Comments
 (0)