From 39eb6c5053d4efefb149c771d007b45dc7f2b773 Mon Sep 17 00:00:00 2001 From: Pieter De Baets Date: Wed, 9 Aug 2017 06:58:03 -0700 Subject: [PATCH] Fix podspec test Summary: Travis-CI Closes https://github.com/facebook/react-native/pull/15428 Differential Revision: D5592214 Pulled By: javache fbshipit-source-id: f006976d7183d845201c001be51d1546c9c31c5a --- React/Base/RCTTVRemoteHandler.m | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/React/Base/RCTTVRemoteHandler.m b/React/Base/RCTTVRemoteHandler.m index 40c7604f4..12d70809d 100644 --- a/React/Base/RCTTVRemoteHandler.m +++ b/React/Base/RCTTVRemoteHandler.m @@ -22,7 +22,9 @@ #import "RCTView.h" #import "UIView+React.h" +#if __has_include("RCTDevMenu.h") #import "RCTDevMenu.h" +#endif @implementation RCTTVRemoteHandler { NSMutableArray *_tvRemoteGestureRecognizers; @@ -62,13 +64,13 @@ // Right [self addTapGestureRecognizerWithSelector:@selector(swipedRight:) pressType:UIPressTypeRightArrow]; - + // Recognizers for long button presses // We don't intercept long menu press -- that's used by the system to go to the home screen - + [self addLongPressGestureRecognizerWithSelector:@selector(longPlayPausePressed:) pressType:UIPressTypePlayPause]; - + [self addLongPressGestureRecognizerWithSelector:@selector(longSelectPressed:) pressType:UIPressTypeSelect]; @@ -114,8 +116,8 @@ { [self sendAppleTVEvent:@"longPlayPause" toView:r.view]; +#if __has_include("RCTDevMenu.h") && RCT_DEV // If shake to show is enabled on device, use long play/pause event to show dev menu -#if RCT_DEV [[NSNotificationCenter defaultCenter] postNotificationName:RCTShowDevMenuNotification object:nil]; #endif } @@ -151,7 +153,7 @@ { UILongPressGestureRecognizer *recognizer = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:selector]; recognizer.allowedPressTypes = @[@(pressType)]; - + [_tvRemoteGestureRecognizers addObject:recognizer]; }