Skip to content

Commit d855e52

Browse files
refactor: remove code for new architecture on old react-native versions (#779)
### Summary Since React Native 0.75 is dropping support soon, I decided to remove this check for 0.71 this makes the `podspec` a lot cleaner. ### Test plan CI Green --------- Co-authored-by: Satyajit Sahoo <satyajit.happy@gmail.com>
1 parent 96ee934 commit d855e52

File tree

1 file changed

+7
-26
lines changed

1 file changed

+7
-26
lines changed
Lines changed: 7 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
require "json"
22

33
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4-
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
54

65
Pod::Spec.new do |s|
76
s.name = "<%- project.name -%>"
@@ -30,29 +29,11 @@ Pod::Spec.new do |s|
3029
add_nitrogen_files(s)
3130
<% } -%>
3231
33-
# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
34-
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
35-
if respond_to?(:install_modules_dependencies, true)
36-
install_modules_dependencies(s)
37-
else
38-
s.dependency "React-Core"
39-
40-
# Don't install the dependencies when we run `pod install` in the old architecture.
41-
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
42-
s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
43-
s.pod_target_xcconfig = {
44-
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
45-
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
46-
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
47-
}
48-
<% if (project.viewConfig !== null) { -%>
49-
s.dependency "React-RCTFabric"
50-
<% } -%>
51-
s.dependency "React-Codegen"
52-
s.dependency "RCT-Folly"
53-
s.dependency "RCTRequired"
54-
s.dependency "RCTTypeSafety"
55-
s.dependency "ReactCommon/turbomodule/core"
56-
end
57-
end
32+
# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
33+
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
34+
if respond_to?(:install_modules_dependencies, true)
35+
install_modules_dependencies(s)
36+
else
37+
s.dependency "React-Core"
38+
end
5839
end

0 commit comments

Comments
 (0)