From 3b17cdb6435dcb975685672be0d29d2f73bf368f Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Wed, 23 Apr 2025 12:15:49 -0700 Subject: [PATCH] Add back the folly_compiler_flags for backward compatibility (#50875) Summary: Some libraries still use the `folly_flags` method provided by our infra. When updating how folly should be installed in an app, we removed that function. We are putting it back as deprecated, to avoid unnecessary breaking changes in libraries ## Changelog: [iOS][Fixed] - Put back the `folly_compiler_flag` function to make libraries install pods Pull Request resolved: https://github.com/facebook/react-native/pull/50875 Test Plan: Tested locally in a nightly app, using the react-native-exit-app library which still uses these flags Reviewed By: cortinico Differential Revision: D73512830 Pulled By: cipolleschi fbshipit-source-id: 28f099064e93ecd5a5a6a7b82e3f7e9db4d35cb9 --- packages/react-native/scripts/cocoapods/new_architecture.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/react-native/scripts/cocoapods/new_architecture.rb b/packages/react-native/scripts/cocoapods/new_architecture.rb index f7e95ac5aa7..02a441467bb 100644 --- a/packages/react-native/scripts/cocoapods/new_architecture.rb +++ b/packages/react-native/scripts/cocoapods/new_architecture.rb @@ -145,6 +145,12 @@ class NewArchitectureHelper return package["version"] end + # Deprecated method. This has been restored because some libraries (e.g. react-native-exit-app) still use it. + def self.folly_compiler_flags + folly_config = Helpers::Constants.folly_config + return folly_config[:compiler_flags] + end + def self.new_arch_enabled return ENV["RCT_NEW_ARCH_ENABLED"] == '0' ? false : true end