From 2f4dbc64b7d58e9a52e5b6efa5b472dc7f803676 Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Mon, 10 Mar 2025 03:08:11 -0700 Subject: [PATCH] Fix bug that prevents the Old Arch from being enabled (#49896) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/49896 This change makes possible to opt-out from the New Architecture. Env variables are always `string`s in ruby and the check was always failing because it was comparing it with a number (always false) ## Changelog: [iOS][Fixed] - enable back the opt-out from the New Architecture Reviewed By: cortinico Differential Revision: D70789827 fbshipit-source-id: 7d3f96c3db22f2715dec2b649534b20e3273ea3e --- packages/react-native/scripts/cocoapods/new_architecture.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/scripts/cocoapods/new_architecture.rb b/packages/react-native/scripts/cocoapods/new_architecture.rb index b50f5c6d236..6354cd5a984 100644 --- a/packages/react-native/scripts/cocoapods/new_architecture.rb +++ b/packages/react-native/scripts/cocoapods/new_architecture.rb @@ -157,6 +157,6 @@ class NewArchitectureHelper end def self.new_arch_enabled - return ENV["RCT_NEW_ARCH_ENABLED"] == 0 ? false : true + return ENV["RCT_NEW_ARCH_ENABLED"] == '0' ? false : true end end