From 56dfc86d64a2a1f2ad05239b6d11aacac73cbac9 Mon Sep 17 00:00:00 2001 From: Nicolas Charpentier Date: Sun, 26 Jan 2020 19:55:24 -0800 Subject: [PATCH] Enable dev keyboard shortcuts on Mac Catalyst (#27479) Summary: This enables the dev menu to bo opened from keyboard shortcuts in dev from a Mac Catalyst app. cc TheSavior andymatuschak radex ## Changelog [iOS] [Fixed] - Enable dev keyboard shortcuts on Mac Catalyst Pull Request resolved: https://github.com/facebook/react-native/pull/27479 Test Plan: It depends on https://github.com/facebook/react-native/issues/27469 (to have working WebSocket in debug). ![image](https://user-images.githubusercontent.com/7189823/70629346-d3a68880-1bf7-11ea-8949-7553157a2f9c.png) Differential Revision: D19576528 Pulled By: shergin fbshipit-source-id: 32b4f8424fb7d270640af4bc50dba24f488bef4f --- React/CoreModules/RCTDevMenu.mm | 2 +- React/CoreModules/RCTRedBox.mm | 2 +- React/Modules/RCTRedBoxExtraDataViewController.m | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/React/CoreModules/RCTDevMenu.mm b/React/CoreModules/RCTDevMenu.mm index 9e857fce32bda1..69ff839faa7be8 100644 --- a/React/CoreModules/RCTDevMenu.mm +++ b/React/CoreModules/RCTDevMenu.mm @@ -122,7 +122,7 @@ - (instancetype)init object:nil]; _extraMenuItems = [NSMutableArray new]; -#if TARGET_OS_SIMULATOR +#if TARGET_OS_SIMULATOR || TARGET_OS_MACCATALYST RCTKeyCommands *commands = [RCTKeyCommands sharedInstance]; __weak __typeof(self) weakSelf = self; diff --git a/React/CoreModules/RCTRedBox.mm b/React/CoreModules/RCTRedBox.mm index 115ecf263bcc61..a83fc0b59d4e68 100644 --- a/React/CoreModules/RCTRedBox.mm +++ b/React/CoreModules/RCTRedBox.mm @@ -116,7 +116,7 @@ - (instancetype)initWithFrame:(CGRect)frame customButtonTitles:(NSArray