Skip to content

Commit c02a38f

Browse files
Riccardo Cipolleschifacebook-github-bot
Riccardo Cipolleschi
authored andcommitted
Migrate React-RCTBlob to add_dependency (#41357)
Summary: This change migrate React-RCTBlob to the new add_dependency to improve its compatibility with macOS and to remove some maintenance burden. ## Context Last week I helped macOS to work with static framework. When multiple platforms are specified, frameworks are build in two variants, the iOS and macOS one. This break all the HEADER_SEARCH_PATHS as now we have to properly specify the base folder from which the search path is generated. See also [this PR](microsoft#1967) where I manually make MacOS work with `use_framewroks!` ## Changelog: [Internal] - Add helper function to create header_search_path Reviewed By: shwanton Differential Revision: D51030365
1 parent 9e930a1 commit c02a38f

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

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

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,8 @@ folly_version = '2023.08.07.00'
2222
header_search_paths = [
2323
"\"$(PODS_ROOT)/RCT-Folly\"",
2424
"\"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\"",
25-
"\"${PODS_CONFIGURATION_BUILD_DIR}/React-Codegen/React_Codegen.framework/Headers\""
2625
]
2726

28-
if ENV["USE_FRAMEWORKS"]
29-
header_search_paths = header_search_paths.concat([
30-
"\"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\"",
31-
"\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\""
32-
])
33-
end
34-
3527
Pod::Spec.new do |s|
3628
s.name = "React-RCTBlob"
3729
s.version = version
@@ -52,12 +44,14 @@ Pod::Spec.new do |s|
5244
}
5345

5446
s.dependency "RCT-Folly", folly_version
55-
s.dependency "React-Codegen", version
56-
s.dependency "ReactCommon/turbomodule/core", version
57-
s.dependency "React-jsi", version
58-
s.dependency "React-Core/RCTBlobHeaders", version
59-
s.dependency "React-Core/RCTWebSocket", version
60-
s.dependency "React-RCTNetwork", version
47+
s.dependency "React-jsi"
48+
s.dependency "React-Core/RCTBlobHeaders"
49+
s.dependency "React-Core/RCTWebSocket"
50+
s.dependency "React-RCTNetwork"
51+
52+
add_dependency(s, "React-Codegen")
53+
add_dependency(s, "React-NativeModulesApple")
54+
add_dependency(s, "ReactCommon", :subspec => "turbomodule/core", :additional_framework_paths => ["react/nativemodule/core"])
6155

6256
if ENV["USE_HERMES"] == nil || ENV["USE_HERMES"] == "1"
6357
s.dependency "hermes-engine"

0 commit comments

Comments
 (0)