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
This commit is contained in:
parent
32eab54781
commit
39d19740d2
|
@ -202,9 +202,9 @@ RCT_EXPORT_METHOD(reload)
|
||||||
[_bridge 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
|
- (BOOL)isShakeToShowDevMenuEnabled
|
||||||
|
|
Loading…
Reference in New Issue