SIGN IN SIGN UP
facebook / react-native UNCLAIMED

A framework for building native applications using React

0 0 0 C++

Add flag to turn off legacy warning (#50249)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50249

This change introduces a flag to turn off the legacy architecture warning if they become too annoying.

The flag can be set in the Info.plist of the React Native architecture and it is controlled by the key: `RCTLegacyWarningsEnabled`.

* If the key is missing or with a value of `YES`, logs are enabled
* If the key has a value of `NO`, react native will not output any log.

We decided to use the Info.plist file to configure the logs because in that way it will work also with React Native prebuilds.

## Changelog:
[iOS][Added] - Add flag to enable or disable legacy warning.

Reviewed By: cortinico

Differential Revision: D71814001

fbshipit-source-id: b6ae6b032ff7add6bae3d73dba490adeaceffa1f
R
Riccardo Cipolleschi committed
ce7a602edfe1e7121b4e7b05b80e338304dcf579
Parent: 8acc53d
Committed by Facebook GitHub Bot <[email protected]> on 4/3/2025, 7:22:17 PM