From 39d19740d295b7dcbac3a655a14a473591216497 Mon Sep 17 00:00:00 2001 From: William Schurman Date: Fri, 21 Apr 2017 02:54:09 -0700 Subject: [PATCH] Expose shake-to-show dev menu setting via the bridge Summary: Apps commonly provide their own rage-shake menus or behaviors, including in dev builds where the dev menu is enabled on shake. Rather than try to override these settings via native code, it can be helpful to let the app define when to show the menu via the bridge. See recent discussion in https://github.com/facebook/react-native/issues/1054 Closes https://github.com/facebook/react-native/pull/13563 Differential Revision: D4928745 Pulled By: javache fbshipit-source-id: a5b30e1b198780bb560e1a6d528f727b3b7d4cb7 --- React/Modules/RCTDevSettings.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/React/Modules/RCTDevSettings.mm b/React/Modules/RCTDevSettings.mm index 51ddba5262..037b0d6293 100644 --- a/React/Modules/RCTDevSettings.mm +++ b/React/Modules/RCTDevSettings.mm @@ -202,9 +202,9 @@ RCT_EXPORT_METHOD(reload) [_bridge reload]; } -- (void)setIsShakeToShowDevMenuEnabled:(BOOL)isShakeToShowDevMenuEnabled +RCT_EXPORT_METHOD(setIsShakeToShowDevMenuEnabled:(BOOL)enabled) { - [self _updateSettingWithValue:@(isShakeToShowDevMenuEnabled) forKey:kRCTDevSettingShakeToShowDevMenu]; + [self _updateSettingWithValue:@(enabled) forKey:kRCTDevSettingShakeToShowDevMenu]; } - (BOOL)isShakeToShowDevMenuEnabled