From 60641c543d720aa4b70fcd25adf6fbe8aac83182 Mon Sep 17 00:00:00 2001 From: Ramanpreet Nara Date: Sat, 12 Dec 2020 18:58:58 -0800 Subject: [PATCH] Manual: Migrate from bridge.devSettings to RCTModuleRegistry Summary: Ran `xbgs .devSettings`, and found all the NativeModules that used the bridge to access DevSettings. Then, I migrated them to use RCTModuleRegistry. Changelog: [Internal] Reviewed By: PeteTheHeat Differential Revision: D25503402 fbshipit-source-id: 26afc45cd1bc63d5de99ea331e7b2949b66be7ce --- React/CoreModules/RCTDevMenu.mm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/React/CoreModules/RCTDevMenu.mm b/React/CoreModules/RCTDevMenu.mm index 1ea0cf65612..78a3b9def5a 100644 --- a/React/CoreModules/RCTDevMenu.mm +++ b/React/CoreModules/RCTDevMenu.mm @@ -136,14 +136,16 @@ RCT_EXPORT_MODULE() [commands registerKeyCommandWithInput:@"i" modifierFlags:UIKeyModifierCommand action:^(__unused UIKeyCommand *command) { - [weakSelf.bridge.devSettings toggleElementInspector]; + [(RCTDevSettings *)[weakSelf.moduleRegistry moduleForName:"DevSettings"] + toggleElementInspector]; }]; // Reload in normal mode [commands registerKeyCommandWithInput:@"n" modifierFlags:UIKeyModifierCommand action:^(__unused UIKeyCommand *command) { - [weakSelf.bridge.devSettings setIsDebuggingRemotely:NO]; + [(RCTDevSettings *)[weakSelf.moduleRegistry moduleForName:"DevSettings"] + setIsDebuggingRemotely:NO]; }]; #endif }