Skip to content

Commit 93fd449

Browse files
Simplify the package podspec file in terms of new architecture
It turns out that the podspec file of the package still included checks for the new architecture. As this is not needed it was removed in this commit, simplifying the podspec.
1 parent 709d9f4 commit 93fd449

File tree

1 file changed

+15
-25
lines changed

1 file changed

+15
-25
lines changed

package/react-native-slider.podspec

Lines changed: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ require 'json'
22

33
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
44

5-
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
6-
new_arch_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == '1'
7-
85
Pod::Spec.new do |s|
96
s.name = "react-native-slider"
107
s.version = package['version']
@@ -18,33 +15,26 @@ Pod::Spec.new do |s|
1815
s.source = { :git => "https://github.com/callstack/react-native-slider.git", :tag => "v#{s.version}" }
1916
s.source_files = "ios/**/*.{h,m,mm}"
2017

21-
if new_arch_enabled
22-
s.subspec "common" do |ss|
23-
ss.source_files = "common/cpp/**/*.{cpp,h}"
24-
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/common/cpp\"" }
25-
end
18+
s.subspec "common" do |ss|
19+
ss.source_files = "common/cpp/**/*.{cpp,h}"
20+
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/common/cpp\"" }
2621
end
2722

2823
if defined?(install_modules_dependencies)
2924
install_modules_dependencies(s)
3025
else
3126
s.dependency 'React-Core'
32-
33-
# This guard prevent to install the dependencies when we run `pod install` in the old architecture.
34-
if new_arch_enabled then
35-
s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
36-
s.pod_target_xcconfig = {
37-
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
38-
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
39-
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
40-
}
41-
42-
s.dependency "React-RCTFabric"
43-
s.dependency "React-Codegen"
44-
s.dependency "RCT-Folly"
45-
s.dependency "RCTRequired"
46-
s.dependency "RCTTypeSafety"
47-
s.dependency "ReactCommon/turbomodule/core"
48-
end
27+
s.compiler_flags = "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32 -DRCT_NEW_ARCH_ENABLED=1"
28+
s.pod_target_xcconfig = {
29+
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
30+
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
31+
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
32+
}
33+
s.dependency "React-RCTFabric"
34+
s.dependency "React-Codegen"
35+
s.dependency "RCT-Folly"
36+
s.dependency "RCTRequired"
37+
s.dependency "RCTTypeSafety"
38+
s.dependency "ReactCommon/turbomodule/core"
4939
end
5040
end

0 commit comments

Comments
 (0)