From 85ce4ef4b68117c517c526fd5a6d9d5953bb537d Mon Sep 17 00:00:00 2001 From: Sota Ogo Date: Wed, 17 Nov 2021 14:48:07 -0800 Subject: [PATCH] use the third party provider in OSS Summary: This diff actually adds the usage of ThirdPartyFabricComponentsProvider. We cannot land this until we start using generate-artifacts.js at pod install time. Changelog: [internal] Reviewed By: hramos Differential Revision: D32128889 fbshipit-source-id: 9af39d73c8b5fe3ff9d70190fd83f679914bfd27 --- .../Mounting/ComponentViews/RCTFabricComponentsPlugins.h | 1 + .../Mounting/ComponentViews/RCTFabricComponentsPlugins.mm | 2 +- React/React-RCTFabric.podspec | 4 ++-- packages/rn-tester/Podfile.lock | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/React/Fabric/Mounting/ComponentViews/RCTFabricComponentsPlugins.h b/React/Fabric/Mounting/ComponentViews/RCTFabricComponentsPlugins.h index 78e52b5e3f5..6a0e9004123 100644 --- a/React/Fabric/Mounting/ComponentViews/RCTFabricComponentsPlugins.h +++ b/React/Fabric/Mounting/ComponentViews/RCTFabricComponentsPlugins.h @@ -17,6 +17,7 @@ // OSS-compatibility layer #import +#import #import #pragma GCC diagnostic push diff --git a/React/Fabric/Mounting/ComponentViews/RCTFabricComponentsPlugins.mm b/React/Fabric/Mounting/ComponentViews/RCTFabricComponentsPlugins.mm index 2d11085a92a..aa265eef23d 100644 --- a/React/Fabric/Mounting/ComponentViews/RCTFabricComponentsPlugins.mm +++ b/React/Fabric/Mounting/ComponentViews/RCTFabricComponentsPlugins.mm @@ -37,7 +37,7 @@ Class RCTFabricComponentsProvider(const char *name) { auto classFunc = p->second; return classFunc(); } - return nil; + return RCTThirdPartyFabricComponentsProvider(name); } #endif // RN_DISABLE_OSS_PLUGIN_HEADER diff --git a/React/React-RCTFabric.podspec b/React/React-RCTFabric.podspec index bf587ae6cf7..4cf2f2d5e3b 100644 --- a/React/React-RCTFabric.podspec +++ b/React/React-RCTFabric.podspec @@ -36,8 +36,8 @@ Pod::Spec.new do |s| s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags s.header_dir = "React" s.framework = "JavaScriptCore" - s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/Headers/Private/React-Core\"" } - s.xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/glog\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/React-Codegen\"", + s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/Headers/Private/React-Core\" \"$(PODS_ROOT)/Headers/Public/React-Codegen\"" } + s.xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/glog\" \"$(PODS_ROOT)/RCT-Folly\"", "OTHER_CFLAGS" => "$(inherited) -DRN_FABRIC_ENABLED" + " " + folly_flags } s.dependency "React-Core", version diff --git a/packages/rn-tester/Podfile.lock b/packages/rn-tester/Podfile.lock index 88bfea49fb5..518392bdf56 100644 --- a/packages/rn-tester/Podfile.lock +++ b/packages/rn-tester/Podfile.lock @@ -914,7 +914,7 @@ SPEC CHECKSUMS: React-RCTActionSheet: 3131a0b9280aa0e51bdf54b3d79aecd8503db62c React-RCTAnimation: 70f2b9daaa1b45dea608be865cc5f2e1789dbc39 React-RCTBlob: 48cae62d905ef96ab10c84ab16163643a3c872a7 - React-RCTFabric: 27d0c8541250efd0d35e4d62e487fdb69481de33 + React-RCTFabric: c126a269f6279896e19e133d6b1e019fa2f0f028 React-RCTImage: 2ce3f1f72de91798eb31c9001b30cab8d1c71c4e React-RCTLinking: 77300bd3cda2a613845ae0056b62ad330c2d319d React-RCTNetwork: 8ef793740f893987384918e04382d37fac36960d