Skip to content

Commit 7976bf1

Browse files
SaadnajmiCopilot
andcommitted
fix(macos): enable RedBox 2 AppKit controller
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent b1c27df commit 7976bf1

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

‎packages/react-native/React/CoreModules/RCTRedBox.mm‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@
2121

2222
#import "CoreModulesPlugins.h"
2323
#import "RCTRedBox+Internal.h"
24-
#if !TARGET_OS_OSX // [macOS]
2524
#import "RCTRedBox2Controller+Internal.h"
26-
#endif // [macOS]
2725
#import "RCTRedBoxController+Internal.h"
2826

2927
#if RCT_DEV_MENU
@@ -197,11 +195,9 @@ - (void)showErrorMessage:(NSString *)message
197195
errorInfo = [self _customizeError:errorInfo];
198196

199197
if (self->_controller == nullptr) {
200-
if (!TARGET_OS_OSX && facebook::react::ReactNativeFeatureFlags::redBoxV2IOS()) { // [macOS]
201-
#if !TARGET_OS_OSX // [macOS]
198+
if (facebook::react::ReactNativeFeatureFlags::redBoxV2IOS()) {
202199
self->_controller = [[RCTRedBox2Controller alloc] initWithCustomButtonTitles:self->_customButtonTitles
203200
customButtonHandlers:self->_customButtonHandlers];
204-
#endif // [macOS]
205201
} else {
206202
self->_controller = [[RCTRedBoxController alloc] initWithCustomButtonTitles:self->_customButtonTitles
207203
customButtonHandlers:self->_customButtonHandlers];

0 commit comments

Comments
 (0)