From 3d7b9cac6e0cfad0fb40707c7120ef591580f5e0 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Fri, 26 Nov 2021 13:48:56 +0100 Subject: [PATCH] fix(macOS): failing build due to missing TARGET_OS_OSX --- apple/RNCWebView.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apple/RNCWebView.m b/apple/RNCWebView.m index d1ca207..1120c9e 100644 --- a/apple/RNCWebView.m +++ b/apple/RNCWebView.m @@ -190,6 +190,7 @@ NSString *const CUSTOM_SELECTOR = @"_CUSTOM_SELECTOR_"; return self; } +#if !TARGET_OS_OSX - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer { // Only allow long press gesture if ([otherGestureRecognizer isKindOfClass:[UILongPressGestureRecognizer class]]) { @@ -225,6 +226,8 @@ NSString *const CUSTOM_SELECTOR = @"_CUSTOM_SELECTOR_"; } } +#endif // !TARGET_OS_OSX + - (void)dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self]; @@ -433,7 +436,7 @@ NSString *const CUSTOM_SELECTOR = @"_CUSTOM_SELECTOR_"; [self setKeyboardDisplayRequiresUserAction: _savedKeyboardDisplayRequiresUserAction]; [self visitSource]; } - +#if !TARGET_OS_OSX // Allow this object to recognize gestures if (self.menuItems != nil) { UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(startLongPress:)]; @@ -444,6 +447,7 @@ NSString *const CUSTOM_SELECTOR = @"_CUSTOM_SELECTOR_"; longPress.cancelsTouchesInView = YES; [self addGestureRecognizer:longPress]; } +#endif // !TARGET_OS_OSX } // Update webview property when the component prop changes.