diff --git a/scripts/cocoapods/__tests__/new_architecture-test.rb b/scripts/cocoapods/__tests__/new_architecture-test.rb index 98ceecdc37a3a1..35394fd1ae56d7 100644 --- a/scripts/cocoapods/__tests__/new_architecture-test.rb +++ b/scripts/cocoapods/__tests__/new_architecture-test.rb @@ -125,6 +125,7 @@ def test_installModulesDependencies_whenNewArchEnabledAndNewArchAndNoSearchPaths assert_equal(spec.compiler_flags, NewArchitectureHelper.folly_compiler_flags) assert_equal(spec.pod_target_xcconfig["HEADER_SEARCH_PATHS"], "\"$(PODS_ROOT)/boost\"") assert_equal(spec.pod_target_xcconfig["CLANG_CXX_LANGUAGE_STANDARD"], "c++17") + assert_equal(spec.pod_target_xcconfig["OTHER_CPLUSPLUSFLAGS"], "$(inherited) -DRCT_NEW_ARCH_ENABLED=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1") assert_equal( spec.dependencies, [ diff --git a/scripts/cocoapods/new_architecture.rb b/scripts/cocoapods/new_architecture.rb index 0ce4b91f8b8f1f..90141cd004c98e 100644 --- a/scripts/cocoapods/new_architecture.rb +++ b/scripts/cocoapods/new_architecture.rb @@ -76,12 +76,13 @@ def self.install_modules_dependencies(spec, new_arch_enabled, folly_version) spec.compiler_flags = compiler_flags.empty? ? @@folly_compiler_flags : "#{compiler_flags} #{@@folly_compiler_flags}" current_config["HEADER_SEARCH_PATHS"] = current_headers.empty? ? boost_search_path : "#{current_headers} #{boost_search_path}" current_config["CLANG_CXX_LANGUAGE_STANDARD"] = @@cplusplus_version - spec.pod_target_xcconfig = current_config + spec.dependency "React-Core" spec.dependency "RCT-Folly", '2021.07.22.00' if new_arch_enabled + current_config["OTHER_CPLUSPLUSFLAGS"] = @@new_arch_cpp_flags spec.dependency "React-RCTFabric" # This is for Fabric Component spec.dependency "React-Codegen" @@ -90,6 +91,8 @@ def self.install_modules_dependencies(spec, new_arch_enabled, folly_version) spec.dependency "ReactCommon/turbomodule/bridging" spec.dependency "ReactCommon/turbomodule/core" end + + spec.pod_target_xcconfig = current_config end def self.folly_compiler_flags