From 41cad354e5e4dbb24d23d2608693ae722a0f3f4e Mon Sep 17 00:00:00 2001 From: Sota Ogo Date: Thu, 16 Dec 2021 15:08:28 -0800 Subject: [PATCH] Fix the default template when RCT_NEW_ARCH_ENABLE=1 (#32775) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/32775 Changelog: [Internal] Fix build issues for the new app template with the new architecture enabled Reviewed By: philIip Differential Revision: D33157325 fbshipit-source-id: ee63f38fbfc088ca193dfa1b48f4b6611257b787 --- React-Core.podspec | 2 +- React/AppSetup/RCTAppSetupUtils.h | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/React-Core.podspec b/React-Core.podspec index 8954b949c12..319fc723468 100644 --- a/React-Core.podspec +++ b/React-Core.podspec @@ -47,7 +47,7 @@ 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/Public/React-hermes\" \"${PODS_ROOT}/Headers/Public/hermes-engine\" \"${PODS_ROOT}/Headers/Public/FlipperKit\" \"$(PODS_ROOT)/Headers/Public/ReactCommon\"", "DEFINES_MODULE" => "YES" } + s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-hermes\" \"${PODS_ROOT}/Headers/Public/hermes-engine\" \"${PODS_ROOT}/Headers/Public/FlipperKit\" \"$(PODS_ROOT)/Headers/Public/ReactCommon\" \"$(PODS_ROOT)/Headers/Public/React-RCTFabric\"", "DEFINES_MODULE" => "YES" } s.user_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/Headers/Private/React-Core\""} s.default_subspec = "Default" diff --git a/React/AppSetup/RCTAppSetupUtils.h b/React/AppSetup/RCTAppSetupUtils.h index 51455e8d148..d600b0c44c7 100644 --- a/React/AppSetup/RCTAppSetupUtils.h +++ b/React/AppSetup/RCTAppSetupUtils.h @@ -33,11 +33,12 @@ RCT_EXTERN_C_BEGIN void RCTAppSetupPrepareApp(UIApplication *application); UIView *RCTAppSetupDefaultRootView(RCTBridge *bridge, NSString *moduleName, NSDictionary *initialProperties); +RCT_EXTERN_C_END + #if RCT_NEW_ARCH_ENABLED -id RCTAppSetupDefaultModuleFromClass(Class moduleClass); -std::unique_ptr RCTAppSetupDefaultJsexecutorFactory( +RCT_EXTERN id RCTAppSetupDefaultModuleFromClass(Class moduleClass); + +std::unique_ptr RCTAppSetupDefaultJsExecutorFactory( RCTBridge *bridge, RCTTurboModuleManager *turboModuleManager); #endif - -RCT_EXTERN_C_END