Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[travis] Fix podspec test #15428

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions React/Base/RCTTVRemoteHandler.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
#import "RCTView.h"
#import "UIView+React.h"

#if __has_include("RCTDevMenu.h")
#import "RCTDevMenu.h"
#endif

@implementation RCTTVRemoteHandler {
NSMutableArray<UIGestureRecognizer *> *_tvRemoteGestureRecognizers;
Expand Down Expand Up @@ -62,13 +64,13 @@ - (instancetype)init
// 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];

Expand Down Expand Up @@ -114,8 +116,8 @@ - (void)longPlayPausePressed:(UIGestureRecognizer *)r
{
[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
}
Expand Down Expand Up @@ -151,7 +153,7 @@ - (void)addLongPressGestureRecognizerWithSelector:(nonnull SEL)selector pressTyp
{
UILongPressGestureRecognizer *recognizer = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:selector];
recognizer.allowedPressTypes = @[@(pressType)];

[_tvRemoteGestureRecognizers addObject:recognizer];
}

Expand Down