From eced906bedf0c3d2bbc592cc27965c88278abae3 Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Fri, 17 Jan 2025 05:07:05 -0800 Subject: [PATCH] Re-enable the New Architecture by default (#48755) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/48755 When [cleaning up the pre-alpha flags](https://github.com/facebook/react-native/commit/9a4b2cecd57dc797f90280be33eb4c80a06aaf72), we disabled the new architecture by default by mistake. This change fixes that. ## Changelog: [Internal] - Restore the New Arch by default Reviewed By: GijsWeterings Differential Revision: D68323159 fbshipit-source-id: cae96fc7c50319808e0afecf46ebf927e4db254a --- packages/react-native/scripts/cocoapods/new_architecture.rb | 2 +- packages/react-native/scripts/react_native_pods.rb | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/react-native/scripts/cocoapods/new_architecture.rb b/packages/react-native/scripts/cocoapods/new_architecture.rb index b5bc7e7de01..5485f26c163 100644 --- a/packages/react-native/scripts/cocoapods/new_architecture.rb +++ b/packages/react-native/scripts/cocoapods/new_architecture.rb @@ -159,6 +159,6 @@ class NewArchitectureHelper end def self.new_arch_enabled - return ENV["RCT_NEW_ARCH_ENABLED"] == nil || ENV["RCT_NEW_ARCH_ENABLED"] == "1" + return ENV["RCT_NEW_ARCH_ENABLED"] == 0 ? false : true end end diff --git a/packages/react-native/scripts/react_native_pods.rb b/packages/react-native/scripts/react_native_pods.rb index a7497190bf0..444e18640fb 100644 --- a/packages/react-native/scripts/react_native_pods.rb +++ b/packages/react-native/scripts/react_native_pods.rb @@ -95,6 +95,8 @@ def use_react_native! ( ReactNativePodsUtils.warn_if_not_on_arm64() + Pod::UI.puts "Configuring the target with the #{new_arch_enabled ? "New" : "Legacy"} Architecture\n" + # The Pods which should be included in all projects pod 'FBLazyVector', :path => "#{prefix}/Libraries/FBLazyVector" pod 'RCTRequired', :path => "#{prefix}/Libraries/Required"