From 536045276cd381aa37f72d9a5afa8ff68b40d575 Mon Sep 17 00:00:00 2001 From: Agustin Collazo Date: Wed, 20 Feb 2019 18:53:43 -0800 Subject: [PATCH] iOS downgrade invalid bridge warning (#23557) Summary: I downgrade the invalid bridge warning because I believe that it is a pain that every time that the JS gets refreshed this warnings are being thrown. If the project increase size and more and more NativeModules are added this warnings just spam the emulator or the device. I understand the reason of validating if the bridge is valid. However in case of invalidness nothing is done, just the warning is thrown. Hence, the reason of downgrading it to improve the development process. The error message still exist and it will be in the logs. But it will not spam the development screen [iOS] [Changed] - Downgrade the Invalid bridge warning message to a log Pull Request resolved: https://github.com/facebook/react-native/pull/23557 Differential Revision: D14161290 Pulled By: cpojer fbshipit-source-id: e5608a9b2db5625309fd18d133fe69a9013043f3 --- React/CxxModule/RCTNativeModule.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/React/CxxModule/RCTNativeModule.mm b/React/CxxModule/RCTNativeModule.mm index 5d4a2b873..ec88558b8 100644 --- a/React/CxxModule/RCTNativeModule.mm +++ b/React/CxxModule/RCTNativeModule.mm @@ -79,7 +79,7 @@ void RCTNativeModule::invoke(unsigned int methodId, folly::dynamic &¶ms, int dispatch_async(queue, block); } } else { - RCTLogWarn(@"Attempted to invoke `%u` (method ID) on `%@` (NativeModule name) with an invalid bridge.", + RCTLog(@"Attempted to invoke `%u` (method ID) on `%@` (NativeModule name) with an invalid bridge.", methodId, m_moduleData.name); } }