Skip to content

Commit ae759a8

Browse files
chrfalchfacebook-github-bot
authored andcommitted
Update podspecs to use the ReactNativeDependencies or build from source (#49968)
Summary: Pull Request resolved: #49968 Updates all the core podspec to use the new `ReactNativeDependencies` podspec ## Changelog: [INTERNAL] - Updates Modules in core to use the new dependencies. Test Plan: ✅ Run Rn-Tester and verify that it works as expected both building deps from source and using prebuilt tarballs ✅ Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities Differential Revision: D71032639 Pulled By: cipolleschi
1 parent a4d3d76 commit ae759a8

File tree

51 files changed

+119
-644
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+119
-644
lines changed

packages/react-native/Libraries/AppDelegate/React-RCTAppDelegate.podspec

+2-11
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,17 @@ else
1616
source[:tag] = "v#{version}"
1717
end
1818

19-
folly_config = get_folly_config()
20-
folly_compiler_flags = folly_config[:compiler_flags]
21-
folly_version = folly_config[:version]
22-
2319
is_new_arch_enabled = ENV["RCT_NEW_ARCH_ENABLED"] != "0"
2420
use_hermes = ENV['USE_HERMES'] == nil || ENV['USE_HERMES'] == '1'
2521

2622
new_arch_enabled_flag = (is_new_arch_enabled ? " -DRCT_NEW_ARCH_ENABLED=1" : "")
2723
hermes_flag = (use_hermes ? " -DUSE_HERMES=1" : "")
2824
use_third_party_jsc_flag = ENV['USE_THIRD_PARTY_JSC'] == '1' ? " -DUSE_THIRD_PARTY_JSC=1" : ""
29-
other_cflags = "$(inherited) " + folly_compiler_flags + new_arch_enabled_flag + hermes_flag + use_third_party_jsc_flag
25+
other_cflags = "$(inherited) " + new_arch_enabled_flag + hermes_flag + use_third_party_jsc_flag
3026

3127
header_search_paths = [
3228
"$(PODS_TARGET_SRCROOT)/../../ReactCommon",
3329
"$(PODS_ROOT)/Headers/Private/React-Core",
34-
"$(PODS_ROOT)/boost",
35-
"$(PODS_ROOT)/DoubleConversion",
36-
"$(PODS_ROOT)/fast_float/include",
37-
"$(PODS_ROOT)/fmt/include",
38-
"$(PODS_ROOT)/RCT-Folly",
3930
"${PODS_ROOT}/Headers/Public/FlipperKit",
4031
"$(PODS_ROOT)/Headers/Public/ReactCommon",
4132
"$(PODS_ROOT)/Headers/Public/React-RCTFabric",
@@ -68,7 +59,6 @@ Pod::Spec.new do |s|
6859
s.user_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/Headers/Private/React-Core\" \"$(PODS_ROOT)/Headers/Private/Yoga\""}
6960

7061
s.dependency "React-Core"
71-
s.dependency "RCT-Folly", folly_version
7262
s.dependency "RCTRequired"
7363
s.dependency "RCTTypeSafety"
7464
s.dependency "React-RCTNetwork"
@@ -93,4 +83,5 @@ Pod::Spec.new do |s|
9383
add_dependency(s, "React-RCTRuntime", :framework_name => "RCTRuntime")
9484

9585
depend_on_js_engine(s)
86+
add_rn_dependencies(s)
9687
end

packages/react-native/Libraries/Blob/React-RCTBlob.podspec

+3-14
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,7 @@ else
1616
source[:tag] = "v#{version}"
1717
end
1818

19-
folly_config = get_folly_config()
20-
folly_compiler_flags = folly_config[:compiler_flags]
21-
folly_version = folly_config[:version]
22-
2319
header_search_paths = [
24-
"\"$(PODS_ROOT)/RCT-Folly\"",
25-
"\"$(PODS_ROOT)/boost\"",
26-
"\"$(PODS_ROOT)/DoubleConversion\"",
27-
"\"$(PODS_ROOT)/fast_float/include\"",
28-
"\"$(PODS_ROOT)/fmt/include\"",
2920
"\"${PODS_ROOT}/Headers/Public/ReactCodegen/react/renderer/components\"",
3021
]
3122

@@ -37,7 +28,7 @@ Pod::Spec.new do |s|
3728
s.license = package["license"]
3829
s.author = "Meta Platforms, Inc. and its affiliates"
3930
s.platforms = min_supported_versions
40-
s.compiler_flags = folly_compiler_flags + ' -Wno-nullability-completeness'
31+
s.compiler_flags = '-Wno-nullability-completeness'
4132
s.source = source
4233
s.source_files = "*.{h,m,mm}"
4334
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
@@ -48,10 +39,6 @@ Pod::Spec.new do |s|
4839
"HEADER_SEARCH_PATHS" => header_search_paths.join(' ')
4940
}
5041

51-
s.dependency "DoubleConversion"
52-
s.dependency "fast_float"
53-
s.dependency "fmt", "11.0.2"
54-
s.dependency "RCT-Folly", folly_version
5542
s.dependency "React-jsi"
5643
s.dependency "React-Core/RCTBlobHeaders"
5744
s.dependency "React-Core/RCTWebSocket"
@@ -65,4 +52,6 @@ Pod::Spec.new do |s|
6552
if ENV["USE_HERMES"] == nil || ENV["USE_HERMES"] == "1"
6653
s.dependency "hermes-engine"
6754
end
55+
56+
add_rn_dependencies(s)
6857
end

packages/react-native/Libraries/Image/React-RCTImage.podspec

+2-7
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,7 @@ else
1616
source[:tag] = "v#{version}"
1717
end
1818

19-
folly_config = get_folly_config()
20-
folly_compiler_flags = folly_config[:compiler_flags]
21-
folly_version = folly_config[:version]
22-
2319
header_search_paths = [
24-
"\"$(PODS_ROOT)/RCT-Folly\"",
2520
"\"${PODS_ROOT}/Headers/Public/ReactCodegen/react/renderer/components\"",
2621
]
2722

@@ -35,7 +30,7 @@ Pod::Spec.new do |s|
3530
s.license = package["license"]
3631
s.author = "Meta Platforms, Inc. and its affiliates"
3732
s.platforms = min_supported_versions
38-
s.compiler_flags = folly_compiler_flags + ' -Wno-nullability-completeness'
33+
s.compiler_flags = '-Wno-nullability-completeness'
3934
s.source = source
4035
s.source_files = "*.{m,mm}"
4136
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
@@ -47,7 +42,6 @@ Pod::Spec.new do |s|
4742
}
4843
s.framework = ["Accelerate", "UIKit", "QuartzCore", "ImageIO", "CoreGraphics"]
4944

50-
s.dependency "RCT-Folly", folly_version
5145
s.dependency "RCTTypeSafety"
5246
s.dependency "React-jsi"
5347
s.dependency "React-Core/RCTImageHeaders"
@@ -57,4 +51,5 @@ Pod::Spec.new do |s|
5751
add_dependency(s, "ReactCommon", :subspec => "turbomodule/core", :additional_framework_paths => ["react/nativemodule/core"])
5852
add_dependency(s, "React-NativeModulesApple")
5953

54+
add_rn_dependencies(s)
6055
end

packages/react-native/Libraries/LinkingIOS/React-RCTLinking.podspec

+1-6
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,7 @@ else
1616
source[:tag] = "v#{version}"
1717
end
1818

19-
folly_config = get_folly_config()
20-
folly_compiler_flags = folly_config[:compiler_flags]
21-
folly_version = folly_config[:version]
22-
2319
header_search_paths = [
24-
"\"$(PODS_ROOT)/RCT-Folly\"",
2520
"\"${PODS_ROOT}/Headers/Public/ReactCodegen/react/renderer/components\"",
2621
]
2722

@@ -34,7 +29,7 @@ Pod::Spec.new do |s|
3429
s.license = package["license"]
3530
s.author = "Meta Platforms, Inc. and its affiliates"
3631
s.platforms = min_supported_versions
37-
s.compiler_flags = folly_compiler_flags + ' -Wno-nullability-completeness'
32+
s.compiler_flags = '-Wno-nullability-completeness'
3833
s.source = source
3934
s.source_files = "*.{m,mm}"
4035
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"

packages/react-native/Libraries/NativeAnimation/React-RCTAnimation.podspec

+3-7
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,7 @@ else
1616
source[:tag] = "v#{version}"
1717
end
1818

19-
folly_config = get_folly_config()
20-
folly_compiler_flags = folly_config[:compiler_flags]
21-
folly_version = folly_config[:version]
22-
2319
header_search_paths = [
24-
"\"$(PODS_ROOT)/RCT-Folly\"",
2520
"\"${PODS_ROOT}/Headers/Public/ReactCodegen/react/renderer/components\"",
2621
]
2722

@@ -33,7 +28,7 @@ Pod::Spec.new do |s|
3328
s.license = package["license"]
3429
s.author = "Meta Platforms, Inc. and its affiliates"
3530
s.platforms = min_supported_versions
36-
s.compiler_flags = folly_compiler_flags + ' -Wno-nullability-completeness'
31+
s.compiler_flags = '-Wno-nullability-completeness'
3732
s.source = source
3833
s.source_files = "**/*.{h,m,mm}"
3934
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
@@ -45,12 +40,13 @@ Pod::Spec.new do |s|
4540
}
4641
s.framework = ["UIKit", "QuartzCore"]
4742

48-
s.dependency "RCT-Folly", folly_version
4943
s.dependency "RCTTypeSafety"
5044
s.dependency "React-jsi"
5145
s.dependency "React-Core/RCTAnimationHeaders"
5246

5347
add_dependency(s, "React-RCTFBReactNativeSpec")
5448
add_dependency(s, "ReactCommon", :subspec => "turbomodule/core", :additional_framework_paths => ["react/nativemodule/core"])
5549
add_dependency(s, "React-NativeModulesApple")
50+
51+
add_rn_dependencies(s)
5652
end

packages/react-native/Libraries/Network/React-RCTNetwork.podspec

+3-7
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,7 @@ else
1616
source[:tag] = "v#{version}"
1717
end
1818

19-
folly_config = get_folly_config()
20-
folly_compiler_flags = folly_config[:compiler_flags]
21-
folly_version = folly_config[:version]
22-
2319
header_search_paths = [
24-
"\"$(PODS_ROOT)/RCT-Folly\"",
2520
"\"${PODS_ROOT}/Headers/Public/ReactCodegen/react/renderer/components\"",
2621
]
2722

@@ -33,7 +28,7 @@ Pod::Spec.new do |s|
3328
s.license = package["license"]
3429
s.author = "Meta Platforms, Inc. and its affiliates"
3530
s.platforms = min_supported_versions
36-
s.compiler_flags = folly_compiler_flags + ' -Wno-nullability-completeness'
31+
s.compiler_flags = '-Wno-nullability-completeness'
3732
s.source = source
3833
s.source_files = "*.{m,mm}"
3934
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
@@ -45,12 +40,13 @@ Pod::Spec.new do |s|
4540
}
4641
s.frameworks = "MobileCoreServices"
4742

48-
s.dependency "RCT-Folly", folly_version
4943
s.dependency "RCTTypeSafety"
5044
s.dependency "React-jsi"
5145
s.dependency "React-Core/RCTNetworkHeaders"
5246

5347
add_dependency(s, "React-RCTFBReactNativeSpec")
5448
add_dependency(s, "ReactCommon", :subspec => "turbomodule/core", :additional_framework_paths => ["react/nativemodule/core"])
5549
add_dependency(s, "React-NativeModulesApple", :additional_framework_paths => ["build/generated/ios"])
50+
51+
add_rn_dependencies(s)
5652
end

packages/react-native/Libraries/PushNotificationIOS/React-RCTPushNotification.podspec

+1-6
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,7 @@ else
1616
source[:tag] = "v#{version}"
1717
end
1818

19-
folly_config = get_folly_config()
20-
folly_compiler_flags = folly_config[:compiler_flags]
21-
folly_version = folly_config[:version]
22-
2319
header_search_paths = [
24-
"\"$(PODS_ROOT)/RCT-Folly\"",
2520
"\"${PODS_ROOT}/Headers/Public/ReactCodegen/react/renderer/components\"",
2621
]
2722

@@ -34,7 +29,7 @@ Pod::Spec.new do |s|
3429
s.license = package["license"]
3530
s.author = "Meta Platforms, Inc. and its affiliates"
3631
s.platforms = min_supported_versions
37-
s.compiler_flags = folly_compiler_flags + ' -Wno-nullability-completeness'
32+
s.compiler_flags = '-Wno-nullability-completeness'
3833
s.source = source
3934
s.source_files = "*.{m,mm}"
4035
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"

packages/react-native/Libraries/Settings/React-RCTSettings.podspec

+3-7
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,7 @@ else
1616
source[:tag] = "v#{version}"
1717
end
1818

19-
folly_config = get_folly_config()
20-
folly_compiler_flags = folly_config[:compiler_flags]
21-
folly_version = folly_config[:version]
22-
2319
header_search_paths = [
24-
"\"$(PODS_ROOT)/RCT-Folly\"",
2520
"\"${PODS_ROOT}/Headers/Public/ReactCodegen/react/renderer/components\"",
2621
]
2722

@@ -34,7 +29,7 @@ Pod::Spec.new do |s|
3429
s.license = package["license"]
3530
s.author = "Meta Platforms, Inc. and its affiliates"
3631
s.platforms = min_supported_versions
37-
s.compiler_flags = folly_compiler_flags + ' -Wno-nullability-completeness'
32+
s.compiler_flags = '-Wno-nullability-completeness'
3833
s.source = source
3934
s.source_files = "*.{m,mm}"
4035
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
@@ -45,12 +40,13 @@ Pod::Spec.new do |s|
4540
"HEADER_SEARCH_PATHS" => header_search_paths.join(' ')
4641
}
4742

48-
s.dependency "RCT-Folly", folly_version
4943
s.dependency "RCTTypeSafety"
5044
s.dependency "React-jsi"
5145
s.dependency "React-Core/RCTSettingsHeaders"
5246

5347
add_dependency(s, "React-RCTFBReactNativeSpec")
5448
add_dependency(s, "ReactCommon", :subspec => "turbomodule/core", :additional_framework_paths => ["react/nativemodule/core"])
5549
add_dependency(s, "React-NativeModulesApple", :additional_framework_paths => ["build/generated/ios"])
50+
51+
add_rn_dependencies(s)
5652
end

packages/react-native/Libraries/Vibration/React-RCTVibration.podspec

+3-7
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,7 @@ else
1616
source[:tag] = "v#{version}"
1717
end
1818

19-
folly_config = get_folly_config()
20-
folly_compiler_flags = folly_config[:compiler_flags]
21-
folly_version = folly_config[:version]
22-
2319
header_search_paths = [
24-
"\"$(PODS_ROOT)/RCT-Folly\"",
2520
"\"${PODS_ROOT}/Headers/Public/ReactCodegen/react/renderer/components\"",
2621
]
2722

@@ -34,7 +29,7 @@ Pod::Spec.new do |s|
3429
s.license = package["license"]
3530
s.author = "Meta Platforms, Inc. and its affiliates"
3631
s.platforms = min_supported_versions
37-
s.compiler_flags = folly_compiler_flags + ' -Wno-nullability-completeness'
32+
s.compiler_flags = '-Wno-nullability-completeness'
3833
s.source = source
3934
s.source_files = "*.{m,mm}"
4035
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
@@ -46,11 +41,12 @@ Pod::Spec.new do |s|
4641
}
4742
s.frameworks = "AudioToolbox"
4843

49-
s.dependency "RCT-Folly", folly_version
5044
s.dependency "React-jsi"
5145
s.dependency "React-Core/RCTVibrationHeaders"
5246

5347
add_dependency(s, "React-RCTFBReactNativeSpec")
5448
add_dependency(s, "ReactCommon", :subspec => "turbomodule/core", :additional_framework_paths => ["react/nativemodule/core"])
5549
add_dependency(s, "React-NativeModulesApple")
50+
51+
add_rn_dependencies(s)
5652
end

packages/react-native/React-Core.podspec

+3-20
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,6 @@ else
1616
source[:tag] = "v#{version}"
1717
end
1818

19-
folly_config = get_folly_config()
20-
folly_compiler_flags = folly_config[:compiler_flags]
21-
folly_version = folly_config[:version]
22-
23-
socket_rocket_config = get_socket_rocket_config()
24-
socket_rocket_version = socket_rocket_config[:version]
25-
26-
boost_config = get_boost_config()
27-
boost_compiler_flags = boost_config[:compiler_flags]
28-
2919
use_hermes = ENV['USE_HERMES'] == nil || ENV['USE_HERMES'] == '1'
3020
use_hermes_flag = use_hermes ? "-DUSE_HERMES=1" : ""
3121
use_third_party_jsc_flag = ENV['USE_THIRD_PARTY_JSC'] == '1' ? "-DUSE_THIRD_PARTY_JSC=1" : ""
@@ -49,11 +39,6 @@ frameworks_search_paths << "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-hermes\"" if
4939

5040
header_search_paths = [
5141
"$(PODS_TARGET_SRCROOT)/ReactCommon",
52-
"$(PODS_ROOT)/boost",
53-
"$(PODS_ROOT)/DoubleConversion",
54-
"$(PODS_ROOT)/fast_float/include",
55-
"$(PODS_ROOT)/fmt/include",
56-
"$(PODS_ROOT)/RCT-Folly",
5742
"${PODS_ROOT}/Headers/Public/FlipperKit",
5843
"$(PODS_ROOT)/Headers/Public/ReactCommon",
5944
].concat(use_hermes ? [
@@ -71,7 +56,7 @@ Pod::Spec.new do |s|
7156
s.platforms = min_supported_versions
7257
s.source = source
7358
s.resource_bundle = { "RCTI18nStrings" => ["React/I18n/strings/*.lproj"]}
74-
s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags + ' ' + use_hermes_flag + ' ' + use_third_party_jsc_flag
59+
s.compiler_flags = use_hermes_flag + ' ' + use_third_party_jsc_flag
7560
s.header_dir = "React"
7661
s.weak_framework = "JavaScriptCore"
7762
s.pod_target_xcconfig = {
@@ -97,7 +82,7 @@ Pod::Spec.new do |s|
9782
]
9883
# If we are using Hermes (the default is use hermes, so USE_HERMES can be nil), we don't have jsc installed
9984
# So we have to exclude the JSCExecutorFactory
100-
if use_hermes
85+
if use_hermes
10186
exclude_files = exclude_files.append("React/CxxBridge/JSCExecutorFactory.{h,mm}")
10287
elsif ENV['USE_THIRD_PARTY_JSC'] == '1'
10388
exclude_files = exclude_files.append("React/CxxBridge/JSCExecutorFactory.{h,mm}")
@@ -130,17 +115,14 @@ Pod::Spec.new do |s|
130115
end
131116
end
132117

133-
s.dependency "RCT-Folly", folly_version
134118
s.dependency "React-cxxreact"
135119
s.dependency "React-perflogger"
136120
s.dependency "React-jsi"
137121
s.dependency "React-jsiexecutor"
138122
s.dependency "React-utils"
139123
s.dependency "React-featureflags"
140-
s.dependency "SocketRocket", socket_rocket_version
141124
s.dependency "React-runtimescheduler"
142125
s.dependency "Yoga"
143-
s.dependency "glog"
144126

145127
s.resource_bundles = {'React-Core_privacy' => 'React/Resources/PrivacyInfo.xcprivacy'}
146128

@@ -149,4 +131,5 @@ Pod::Spec.new do |s|
149131
add_dependency(s, "RCTDeprecation")
150132

151133
depend_on_js_engine(s)
134+
add_rn_dependencies(s)
152135
end

0 commit comments

Comments
 (0)