From 6e7b7a4dc3fa937e1859bd5dd946f6d08d8f31f1 Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Wed, 8 Nov 2023 02:18:19 -0800 Subject: [PATCH] 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](https://github.com/microsoft/react-native-macos/pull/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 --- .../Libraries/Blob/React-RCTBlob.podspec | 22 +++++++------------ 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/packages/react-native/Libraries/Blob/React-RCTBlob.podspec b/packages/react-native/Libraries/Blob/React-RCTBlob.podspec index eccfe09e0f595e..1e1f5d36741473 100644 --- a/packages/react-native/Libraries/Blob/React-RCTBlob.podspec +++ b/packages/react-native/Libraries/Blob/React-RCTBlob.podspec @@ -22,16 +22,8 @@ folly_version = '2023.08.07.00' header_search_paths = [ "\"$(PODS_ROOT)/RCT-Folly\"", "\"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Codegen/React_Codegen.framework/Headers\"" ] -if ENV["USE_FRAMEWORKS"] - header_search_paths = header_search_paths.concat([ - "\"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\"" - ]) -end - Pod::Spec.new do |s| s.name = "React-RCTBlob" s.version = version @@ -52,12 +44,14 @@ Pod::Spec.new do |s| } s.dependency "RCT-Folly", folly_version - s.dependency "React-Codegen", version - s.dependency "ReactCommon/turbomodule/core", version - s.dependency "React-jsi", version - s.dependency "React-Core/RCTBlobHeaders", version - s.dependency "React-Core/RCTWebSocket", version - s.dependency "React-RCTNetwork", version + s.dependency "React-jsi" + s.dependency "React-Core/RCTBlobHeaders" + s.dependency "React-Core/RCTWebSocket" + s.dependency "React-RCTNetwork" + + add_dependency(s, "React-Codegen") + add_dependency(s, "React-NativeModulesApple") + add_dependency(s, "ReactCommon", :subspec => "turbomodule/core", :additional_framework_paths => ["react/nativemodule/core"]) if ENV["USE_HERMES"] == nil || ENV["USE_HERMES"] == "1" s.dependency "hermes-engine"