diff --git a/apple/RNCWebView.m b/apple/RNCWebView.m index d1ca20778..1120c9edf 100644 --- a/apple/RNCWebView.m +++ b/apple/RNCWebView.m @@ -190,6 +190,7 @@ - (instancetype)initWithFrame:(CGRect)frame 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 @@ - (void)startLongPress:(UILongPressGestureRecognizer *)pressSender } } +#endif // !TARGET_OS_OSX + - (void)dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self]; @@ -433,7 +436,7 @@ - (void)didMoveToWindow [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 @@ - (void)didMoveToWindow longPress.cancelsTouchesInView = YES; [self addGestureRecognizer:longPress]; } +#endif // !TARGET_OS_OSX } // Update webview property when the component prop changes.