react-native-tvos 0.64.2-3 → 0.64.2-4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/React/Base/RCTRootView.m +5 -35
- package/React/Base/RCTTVRemoteHandler.h +5 -2
- package/React/Base/RCTTVRemoteHandler.m +173 -70
- package/React/Modules/RCTTVMenuBridge.m +3 -0
- package/React/Views/RCTModalHostView.m +6 -9
- package/ReactAndroid/gradle.properties +1 -1
- package/android/com/facebook/react/react-native/{0.64.2-3/react-native-0.64.2-3-sources.jar → 0.64.2-4/react-native-0.64.2-4-sources.jar} +0 -0
- package/android/com/facebook/react/react-native/0.64.2-4/react-native-0.64.2-4-sources.jar.md5 +1 -0
- package/android/com/facebook/react/react-native/0.64.2-4/react-native-0.64.2-4-sources.jar.sha1 +1 -0
- package/android/com/facebook/react/react-native/{0.64.2-3/react-native-0.64.2-3.aar → 0.64.2-4/react-native-0.64.2-4.aar} +0 -0
- package/android/com/facebook/react/react-native/{0.64.2-3/react-native-0.64.2-3.aar.md5 → 0.64.2-4/react-native-0.64.2-4.aar.md5} +0 -0
- package/android/com/facebook/react/react-native/{0.64.2-3/react-native-0.64.2-3.aar.sha1 → 0.64.2-4/react-native-0.64.2-4.aar.sha1} +0 -0
- package/android/com/facebook/react/react-native/{0.64.2-3/react-native-0.64.2-3.pom → 0.64.2-4/react-native-0.64.2-4.pom} +1 -1
- package/android/com/facebook/react/react-native/0.64.2-4/react-native-0.64.2-4.pom.md5 +1 -0
- package/android/com/facebook/react/react-native/0.64.2-4/react-native-0.64.2-4.pom.sha1 +1 -0
- package/android/com/facebook/react/react-native/maven-metadata.xml +3 -3
- package/android/com/facebook/react/react-native/maven-metadata.xml.md5 +1 -1
- package/android/com/facebook/react/react-native/maven-metadata.xml.sha1 +1 -1
- package/package.json +1 -1
- package/template/package.json +1 -1
- package/android/com/facebook/react/react-native/0.64.2-3/react-native-0.64.2-3-sources.jar.md5 +0 -1
- package/android/com/facebook/react/react-native/0.64.2-3/react-native-0.64.2-3-sources.jar.sha1 +0 -1
- package/android/com/facebook/react/react-native/0.64.2-3/react-native-0.64.2-3.pom.md5 +0 -1
- package/android/com/facebook/react/react-native/0.64.2-3/react-native-0.64.2-3.pom.sha1 +0 -1
package/React/Base/RCTRootView.m
CHANGED
|
@@ -98,15 +98,6 @@ NSString *const RCTTVDisableMenuKeyNotification = @"RCTTVDisableMenuKeyNotificat
|
|
|
98
98
|
object:self];
|
|
99
99
|
|
|
100
100
|
#if TARGET_OS_TV
|
|
101
|
-
[[NSNotificationCenter defaultCenter] addObserver:self
|
|
102
|
-
selector:@selector(enableTVMenuKey)
|
|
103
|
-
name:RCTTVEnableMenuKeyNotification
|
|
104
|
-
object:nil];
|
|
105
|
-
|
|
106
|
-
[[NSNotificationCenter defaultCenter] addObserver:self
|
|
107
|
-
selector:@selector(disableTVMenuKey)
|
|
108
|
-
name:RCTTVDisableMenuKeyNotification
|
|
109
|
-
object:nil];
|
|
110
101
|
|
|
111
102
|
#if RCT_DEV
|
|
112
103
|
[[NSNotificationCenter defaultCenter] addObserver:self
|
|
@@ -115,11 +106,7 @@ NSString *const RCTTVDisableMenuKeyNotification = @"RCTTVDisableMenuKeyNotificat
|
|
|
115
106
|
object:nil];
|
|
116
107
|
#endif
|
|
117
108
|
|
|
118
|
-
self.tvRemoteHandler = [RCTTVRemoteHandler
|
|
119
|
-
for (NSString *key in [self.tvRemoteHandler.tvRemoteGestureRecognizers allKeys]) {
|
|
120
|
-
[self addGestureRecognizer:self.tvRemoteHandler.tvRemoteGestureRecognizers[key]];
|
|
121
|
-
}
|
|
122
|
-
// [self addGestureRecognizer:self.tvRemoteHandler.tvMenuKeyRecognizer];
|
|
109
|
+
self.tvRemoteHandler = [[RCTTVRemoteHandler alloc] initWithView:self];
|
|
123
110
|
#endif
|
|
124
111
|
|
|
125
112
|
[self showLoadingView];
|
|
@@ -134,32 +121,12 @@ NSString *const RCTTVDisableMenuKeyNotification = @"RCTTVDisableMenuKeyNotificat
|
|
|
134
121
|
return self;
|
|
135
122
|
}
|
|
136
123
|
|
|
137
|
-
#if TARGET_OS_TV
|
|
138
|
-
|
|
139
|
-
- (void)enableTVMenuKey {
|
|
140
|
-
dispatch_async(dispatch_get_main_queue(), ^{
|
|
141
|
-
if (![[self gestureRecognizers] containsObject:self.tvRemoteHandler.tvMenuKeyRecognizer]) {
|
|
142
|
-
[self addGestureRecognizer:self.tvRemoteHandler.tvMenuKeyRecognizer];
|
|
143
|
-
}
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
- (void)disableTVMenuKey {
|
|
148
|
-
dispatch_async(dispatch_get_main_queue(), ^{
|
|
149
|
-
if ([[self gestureRecognizers] containsObject:self.tvRemoteHandler.tvMenuKeyRecognizer]) {
|
|
150
|
-
[self removeGestureRecognizer:self.tvRemoteHandler.tvMenuKeyRecognizer];
|
|
151
|
-
}
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
#if RCT_DEV
|
|
124
|
+
#if TARGET_OS_TV && RCT_DEV
|
|
156
125
|
- (void)showDevMenu {
|
|
157
126
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
158
127
|
[[self->_bridge devMenu] show];
|
|
159
128
|
});
|
|
160
129
|
}
|
|
161
|
-
#endif
|
|
162
|
-
|
|
163
130
|
#endif // TARGET_OS_TV
|
|
164
131
|
|
|
165
132
|
- (instancetype)initWithBundleURL:(NSURL *)bundleURL
|
|
@@ -443,6 +410,9 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : (NSCoder *)aDecoder)
|
|
|
443
410
|
|
|
444
411
|
- (void)dealloc
|
|
445
412
|
{
|
|
413
|
+
#if TARGET_OS_TV
|
|
414
|
+
self.tvRemoteHandler = nil;
|
|
415
|
+
#endif
|
|
446
416
|
[_contentView invalidate];
|
|
447
417
|
}
|
|
448
418
|
|
|
@@ -26,7 +26,10 @@ extern NSString *const RCTTVRemoteEventSwipeDown;
|
|
|
26
26
|
|
|
27
27
|
@interface RCTTVRemoteHandler : NSObject
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
- (instancetype _Nonnull )initWithView:(UIView * _Nonnull)view;
|
|
30
|
+
- (instancetype _Nonnull )init __attribute__((unavailable("init not available, use initWithView:")));
|
|
31
|
+
|
|
32
|
+
+ (BOOL)useMenuKey;
|
|
33
|
+
+ (void)setUseMenuKey:(BOOL)useMenuKey;
|
|
31
34
|
|
|
32
35
|
@end
|
|
@@ -37,87 +37,189 @@ NSString *const RCTTVRemoteEventSwipeRight = @"swipeRight";
|
|
|
37
37
|
NSString *const RCTTVRemoteEventSwipeUp = @"swipeUp";
|
|
38
38
|
NSString *const RCTTVRemoteEventSwipeDown = @"swipeDown";
|
|
39
39
|
|
|
40
|
+
@interface RCTTVRemoteHandler()
|
|
41
|
+
|
|
42
|
+
@property (nonatomic, copy, readonly) NSDictionary *tvRemoteGestureRecognizers;
|
|
43
|
+
@property (nonatomic, strong) UITapGestureRecognizer *tvMenuKeyRecognizer;
|
|
44
|
+
@property (nonatomic, weak) UIView *view;
|
|
45
|
+
|
|
46
|
+
@end
|
|
47
|
+
|
|
40
48
|
@implementation RCTTVRemoteHandler {
|
|
41
49
|
NSMutableDictionary<NSString *, UIGestureRecognizer *> *_tvRemoteGestureRecognizers;
|
|
42
50
|
}
|
|
43
51
|
|
|
44
|
-
-
|
|
52
|
+
#pragma mark -
|
|
53
|
+
#pragma mark Static setting for using menu key
|
|
54
|
+
|
|
55
|
+
static __volatile BOOL __useMenuKey = NO;
|
|
56
|
+
|
|
57
|
+
+ (BOOL)useMenuKey
|
|
58
|
+
{
|
|
59
|
+
return __useMenuKey;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
+ (void)setUseMenuKey:(BOOL)useMenuKey
|
|
63
|
+
{
|
|
64
|
+
__useMenuKey = useMenuKey;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
#pragma mark -
|
|
68
|
+
#pragma mark Public methods
|
|
69
|
+
|
|
70
|
+
- (instancetype)initWithView:(UIView *)view
|
|
45
71
|
{
|
|
46
72
|
if ((self = [super init])) {
|
|
73
|
+
_view = view;
|
|
74
|
+
[self setUpGestureRecognizers];
|
|
75
|
+
[self attachToView];
|
|
76
|
+
}
|
|
77
|
+
return self;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
- (void)dealloc
|
|
81
|
+
{
|
|
82
|
+
[self detachFromView];
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
#pragma mark -
|
|
86
|
+
#pragma mark Private methods
|
|
87
|
+
|
|
88
|
+
- (void)setUpGestureRecognizers
|
|
89
|
+
{
|
|
47
90
|
_tvRemoteGestureRecognizers = [NSMutableDictionary dictionary];
|
|
91
|
+
// Recognizers for Apple TV remote buttons
|
|
92
|
+
// Menu recognizer
|
|
93
|
+
self.tvMenuKeyRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(menuPressed:)];
|
|
94
|
+
self.tvMenuKeyRecognizer.allowedPressTypes = @[@(UIPressTypeMenu)];
|
|
95
|
+
|
|
96
|
+
// Play/Pause
|
|
97
|
+
[self addTapGestureRecognizerWithSelector:@selector(playPausePressed:)
|
|
98
|
+
pressType:UIPressTypePlayPause
|
|
99
|
+
name:RCTTVRemoteEventPlayPause];
|
|
100
|
+
|
|
101
|
+
// Select
|
|
102
|
+
[self addTapGestureRecognizerWithSelector:@selector(selectPressed:)
|
|
103
|
+
pressType:UIPressTypeSelect
|
|
104
|
+
name:RCTTVRemoteEventSelect];
|
|
105
|
+
|
|
106
|
+
// Up
|
|
107
|
+
[self addTapGestureRecognizerWithSelector:@selector(tappedUp:)
|
|
108
|
+
pressType:UIPressTypeUpArrow
|
|
109
|
+
name:RCTTVRemoteEventUp];
|
|
110
|
+
|
|
111
|
+
// Down
|
|
112
|
+
[self addTapGestureRecognizerWithSelector:@selector(tappedDown:)
|
|
113
|
+
pressType:UIPressTypeDownArrow
|
|
114
|
+
name:RCTTVRemoteEventDown];
|
|
115
|
+
|
|
116
|
+
// Left
|
|
117
|
+
[self addTapGestureRecognizerWithSelector:@selector(tappedLeft:)
|
|
118
|
+
pressType:UIPressTypeLeftArrow
|
|
119
|
+
name:RCTTVRemoteEventLeft];
|
|
120
|
+
|
|
121
|
+
// Right
|
|
122
|
+
[self addTapGestureRecognizerWithSelector:@selector(tappedRight:)
|
|
123
|
+
pressType:UIPressTypeRightArrow
|
|
124
|
+
name:RCTTVRemoteEventRight];
|
|
125
|
+
|
|
126
|
+
// Recognizers for long button presses
|
|
127
|
+
// We don't intercept long menu press -- that's used by the system to go to the home screen
|
|
128
|
+
|
|
129
|
+
[self addLongPressGestureRecognizerWithSelector:@selector(longPlayPausePressed:)
|
|
130
|
+
pressType:UIPressTypePlayPause
|
|
131
|
+
name:RCTTVRemoteEventLongPlayPause];
|
|
132
|
+
|
|
133
|
+
[self addLongPressGestureRecognizerWithSelector:@selector(longSelectPressed:)
|
|
134
|
+
pressType:UIPressTypeSelect
|
|
135
|
+
name:RCTTVRemoteEventLongSelect];
|
|
136
|
+
|
|
137
|
+
// Recognizers for Apple TV remote trackpad swipes
|
|
138
|
+
|
|
139
|
+
// Up
|
|
140
|
+
[self addSwipeGestureRecognizerWithSelector:@selector(swipedUp:)
|
|
141
|
+
direction:UISwipeGestureRecognizerDirectionUp
|
|
142
|
+
name:RCTTVRemoteEventSwipeUp];
|
|
143
|
+
|
|
144
|
+
// Down
|
|
145
|
+
[self addSwipeGestureRecognizerWithSelector:@selector(swipedDown:)
|
|
146
|
+
direction:UISwipeGestureRecognizerDirectionDown
|
|
147
|
+
name:RCTTVRemoteEventSwipeDown];
|
|
148
|
+
|
|
149
|
+
// Left
|
|
150
|
+
[self addSwipeGestureRecognizerWithSelector:@selector(swipedLeft:)
|
|
151
|
+
direction:UISwipeGestureRecognizerDirectionLeft
|
|
152
|
+
name:RCTTVRemoteEventSwipeLeft];
|
|
153
|
+
|
|
154
|
+
// Right
|
|
155
|
+
[self addSwipeGestureRecognizerWithSelector:@selector(swipedRight:)
|
|
156
|
+
direction:UISwipeGestureRecognizerDirectionRight
|
|
157
|
+
name:RCTTVRemoteEventSwipeRight];
|
|
48
158
|
|
|
49
|
-
|
|
50
|
-
// Menu recognizer
|
|
51
|
-
self.tvMenuKeyRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(menuPressed:)];
|
|
52
|
-
self.tvMenuKeyRecognizer.allowedPressTypes = @[@(UIPressTypeMenu)];
|
|
53
|
-
|
|
54
|
-
// Play/Pause
|
|
55
|
-
[self addTapGestureRecognizerWithSelector:@selector(playPausePressed:)
|
|
56
|
-
pressType:UIPressTypePlayPause
|
|
57
|
-
name:RCTTVRemoteEventPlayPause];
|
|
58
|
-
|
|
59
|
-
// Select
|
|
60
|
-
[self addTapGestureRecognizerWithSelector:@selector(selectPressed:)
|
|
61
|
-
pressType:UIPressTypeSelect
|
|
62
|
-
name:RCTTVRemoteEventSelect];
|
|
63
|
-
|
|
64
|
-
// Up
|
|
65
|
-
[self addTapGestureRecognizerWithSelector:@selector(tappedUp:)
|
|
66
|
-
pressType:UIPressTypeUpArrow
|
|
67
|
-
name:RCTTVRemoteEventUp];
|
|
68
|
-
|
|
69
|
-
// Down
|
|
70
|
-
[self addTapGestureRecognizerWithSelector:@selector(tappedDown:)
|
|
71
|
-
pressType:UIPressTypeDownArrow
|
|
72
|
-
name:RCTTVRemoteEventDown];
|
|
73
|
-
|
|
74
|
-
// Left
|
|
75
|
-
[self addTapGestureRecognizerWithSelector:@selector(tappedLeft:)
|
|
76
|
-
pressType:UIPressTypeLeftArrow
|
|
77
|
-
name:RCTTVRemoteEventLeft];
|
|
78
|
-
|
|
79
|
-
// Right
|
|
80
|
-
[self addTapGestureRecognizerWithSelector:@selector(tappedRight:)
|
|
81
|
-
pressType:UIPressTypeRightArrow
|
|
82
|
-
name:RCTTVRemoteEventRight];
|
|
83
|
-
|
|
84
|
-
// Recognizers for long button presses
|
|
85
|
-
// We don't intercept long menu press -- that's used by the system to go to the home screen
|
|
86
|
-
|
|
87
|
-
[self addLongPressGestureRecognizerWithSelector:@selector(longPlayPausePressed:)
|
|
88
|
-
pressType:UIPressTypePlayPause
|
|
89
|
-
name:RCTTVRemoteEventLongPlayPause];
|
|
90
|
-
|
|
91
|
-
[self addLongPressGestureRecognizerWithSelector:@selector(longSelectPressed:)
|
|
92
|
-
pressType:UIPressTypeSelect
|
|
93
|
-
name:RCTTVRemoteEventLongSelect];
|
|
94
|
-
|
|
95
|
-
// Recognizers for Apple TV remote trackpad swipes
|
|
96
|
-
|
|
97
|
-
// Up
|
|
98
|
-
[self addSwipeGestureRecognizerWithSelector:@selector(swipedUp:)
|
|
99
|
-
direction:UISwipeGestureRecognizerDirectionUp
|
|
100
|
-
name:RCTTVRemoteEventSwipeUp];
|
|
101
|
-
|
|
102
|
-
// Down
|
|
103
|
-
[self addSwipeGestureRecognizerWithSelector:@selector(swipedDown:)
|
|
104
|
-
direction:UISwipeGestureRecognizerDirectionDown
|
|
105
|
-
name:RCTTVRemoteEventSwipeDown];
|
|
106
|
-
|
|
107
|
-
// Left
|
|
108
|
-
[self addSwipeGestureRecognizerWithSelector:@selector(swipedLeft:)
|
|
109
|
-
direction:UISwipeGestureRecognizerDirectionLeft
|
|
110
|
-
name:RCTTVRemoteEventSwipeLeft];
|
|
111
|
-
|
|
112
|
-
// Right
|
|
113
|
-
[self addSwipeGestureRecognizerWithSelector:@selector(swipedRight:)
|
|
114
|
-
direction:UISwipeGestureRecognizerDirectionRight
|
|
115
|
-
name:RCTTVRemoteEventSwipeRight];
|
|
116
|
-
}
|
|
159
|
+
}
|
|
117
160
|
|
|
118
|
-
|
|
161
|
+
- (void)attachToView
|
|
162
|
+
{
|
|
163
|
+
[[NSNotificationCenter defaultCenter] addObserver:self
|
|
164
|
+
selector:@selector(enableTVMenuKey)
|
|
165
|
+
name:RCTTVEnableMenuKeyNotification
|
|
166
|
+
object:nil];
|
|
167
|
+
|
|
168
|
+
[[NSNotificationCenter defaultCenter] addObserver:self
|
|
169
|
+
selector:@selector(disableTVMenuKey)
|
|
170
|
+
name:RCTTVDisableMenuKeyNotification
|
|
171
|
+
object:nil];
|
|
172
|
+
for (NSString *key in [self.tvRemoteGestureRecognizers allKeys]) {
|
|
173
|
+
[_view addGestureRecognizer:self.tvRemoteGestureRecognizers[key]];
|
|
174
|
+
}
|
|
175
|
+
if ([RCTTVRemoteHandler useMenuKey]) {
|
|
176
|
+
[self enableTVMenuKey];
|
|
177
|
+
} else {
|
|
178
|
+
[self disableTVMenuKey];
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
- (void)detachFromView
|
|
183
|
+
{
|
|
184
|
+
if ([[self.view gestureRecognizers] containsObject:self.tvMenuKeyRecognizer]) {
|
|
185
|
+
[self.view removeGestureRecognizer:self.tvMenuKeyRecognizer];
|
|
186
|
+
}
|
|
187
|
+
for (NSString *key in [self.tvRemoteGestureRecognizers allKeys]) {
|
|
188
|
+
[_view removeGestureRecognizer:self.tvRemoteGestureRecognizers[key]];
|
|
189
|
+
}
|
|
190
|
+
[[NSNotificationCenter defaultCenter] removeObserver:self
|
|
191
|
+
name:RCTTVEnableMenuKeyNotification
|
|
192
|
+
object:nil];
|
|
193
|
+
[[NSNotificationCenter defaultCenter] removeObserver:self
|
|
194
|
+
name:RCTTVDisableMenuKeyNotification
|
|
195
|
+
object:nil];
|
|
196
|
+
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
# pragma mark -
|
|
200
|
+
# pragma mark Notification handlers
|
|
201
|
+
|
|
202
|
+
- (void)enableTVMenuKey
|
|
203
|
+
{
|
|
204
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
205
|
+
if (![[self.view gestureRecognizers] containsObject:self.tvMenuKeyRecognizer]) {
|
|
206
|
+
[self.view addGestureRecognizer:self.tvMenuKeyRecognizer];
|
|
207
|
+
}
|
|
208
|
+
});
|
|
119
209
|
}
|
|
120
210
|
|
|
211
|
+
- (void)disableTVMenuKey
|
|
212
|
+
{
|
|
213
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
214
|
+
if ([[self.view gestureRecognizers] containsObject:self.tvMenuKeyRecognizer]) {
|
|
215
|
+
[self.view removeGestureRecognizer:self.tvMenuKeyRecognizer];
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
# pragma mark -
|
|
221
|
+
# pragma mark Gesture handlers
|
|
222
|
+
|
|
121
223
|
- (void)playPausePressed:(UIGestureRecognizer *)r
|
|
122
224
|
{
|
|
123
225
|
[self sendAppleTVEvent:RCTTVRemoteEventPlayPause toView:r.view];
|
|
@@ -189,6 +291,7 @@ NSString *const RCTTVRemoteEventSwipeDown = @"swipeDown";
|
|
|
189
291
|
}
|
|
190
292
|
|
|
191
293
|
#pragma mark -
|
|
294
|
+
#pragma mark Convenience methods for adding gesture recognizers
|
|
192
295
|
|
|
193
296
|
- (void)addLongPressGestureRecognizerWithSelector:(nonnull SEL)selector
|
|
194
297
|
pressType:(UIPressType)pressType
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
#import "RCTTVMenuBridge.h"
|
|
8
8
|
#import <React/RCTRootView.h>
|
|
9
|
+
#import <React/RCTTVRemoteHandler.h>
|
|
9
10
|
|
|
10
11
|
@implementation RCTTVMenuBridge
|
|
11
12
|
|
|
@@ -13,11 +14,13 @@ RCT_EXPORT_MODULE();
|
|
|
13
14
|
|
|
14
15
|
RCT_EXPORT_METHOD(enableTVMenuKey)
|
|
15
16
|
{
|
|
17
|
+
[RCTTVRemoteHandler setUseMenuKey:YES];
|
|
16
18
|
[[NSNotificationCenter defaultCenter] postNotificationName:RCTTVEnableMenuKeyNotification object:nil];
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
RCT_EXPORT_METHOD(disableTVMenuKey)
|
|
20
22
|
{
|
|
23
|
+
[RCTTVRemoteHandler setUseMenuKey:NO];
|
|
21
24
|
[[NSNotificationCenter defaultCenter] postNotificationName:RCTTVDisableMenuKeyNotification object:nil];
|
|
22
25
|
}
|
|
23
26
|
|
|
@@ -49,7 +49,7 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : coder)
|
|
|
49
49
|
_menuButtonGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self
|
|
50
50
|
action:@selector(menuButtonPressed:)];
|
|
51
51
|
_menuButtonGestureRecognizer.allowedPressTypes = @[ @(UIPressTypeMenu) ];
|
|
52
|
-
self.tvRemoteHandler = [RCTTVRemoteHandler
|
|
52
|
+
self.tvRemoteHandler = [[RCTTVRemoteHandler alloc] initWithView:self];
|
|
53
53
|
#endif
|
|
54
54
|
_isPresented = NO;
|
|
55
55
|
|
|
@@ -63,6 +63,11 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : coder)
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
#if TARGET_OS_TV
|
|
66
|
+
- (void)dealloc
|
|
67
|
+
{
|
|
68
|
+
self.tvRemoteHandler = nil;
|
|
69
|
+
}
|
|
70
|
+
|
|
66
71
|
- (void)menuButtonPressed:(__unused UIGestureRecognizer *)gestureRecognizer
|
|
67
72
|
{
|
|
68
73
|
if (_onRequestClose) {
|
|
@@ -119,11 +124,6 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : coder)
|
|
|
119
124
|
[super insertReactSubview:subview atIndex:atIndex];
|
|
120
125
|
[_touchHandler attachToView:subview];
|
|
121
126
|
#if TARGET_OS_TV
|
|
122
|
-
for (NSString *key in [self.tvRemoteHandler.tvRemoteGestureRecognizers allKeys]) {
|
|
123
|
-
if (![key isEqualToString:RCTTVRemoteEventMenu]) {
|
|
124
|
-
[subview addGestureRecognizer:self.tvRemoteHandler.tvRemoteGestureRecognizers[key]];
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
127
|
if (_onRequestClose) {
|
|
128
128
|
[subview addGestureRecognizer:_menuButtonGestureRecognizer];
|
|
129
129
|
}
|
|
@@ -143,9 +143,6 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : coder)
|
|
|
143
143
|
if (_menuButtonGestureRecognizer) {
|
|
144
144
|
[subview removeGestureRecognizer:_menuButtonGestureRecognizer];
|
|
145
145
|
}
|
|
146
|
-
for (UIGestureRecognizer *gr in self.tvRemoteHandler.tvRemoteGestureRecognizers) {
|
|
147
|
-
[subview removeGestureRecognizer:gr];
|
|
148
|
-
}
|
|
149
146
|
#endif
|
|
150
147
|
_reactSubview = nil;
|
|
151
148
|
}
|
|
Binary file
|
package/android/com/facebook/react/react-native/0.64.2-4/react-native-0.64.2-4-sources.jar.md5
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
5af97ab5916e36594287142cf6d5b4e7
|
package/android/com/facebook/react/react-native/0.64.2-4/react-native-0.64.2-4-sources.jar.sha1
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
b6f3146f2cc0274f0c89ac592866f171400dacc4
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<modelVersion>4.0.0</modelVersion>
|
|
5
5
|
<groupId>com.facebook.react</groupId>
|
|
6
6
|
<artifactId>react-native</artifactId>
|
|
7
|
-
<version>0.64.2-
|
|
7
|
+
<version>0.64.2-4</version>
|
|
8
8
|
<packaging>aar</packaging>
|
|
9
9
|
<name>ReactNative</name>
|
|
10
10
|
<description>A framework for building native apps with React</description>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0add7dd5b03a43bbf55520514e47b9ac
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
6ce251aa47b824176c70dd334d5fb32925028766
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
<groupId>com.facebook.react</groupId>
|
|
4
4
|
<artifactId>react-native</artifactId>
|
|
5
5
|
<versioning>
|
|
6
|
-
<release>0.64.2-
|
|
6
|
+
<release>0.64.2-4</release>
|
|
7
7
|
<versions>
|
|
8
|
-
<version>0.64.2-
|
|
8
|
+
<version>0.64.2-4</version>
|
|
9
9
|
</versions>
|
|
10
|
-
<lastUpdated>
|
|
10
|
+
<lastUpdated>20210918182424</lastUpdated>
|
|
11
11
|
</versioning>
|
|
12
12
|
</metadata>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
58c4fe738dc622d3975f141139831785
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
addb4371d384064a4aaadfc4770f8c24a398ba53
|
package/package.json
CHANGED
package/template/package.json
CHANGED
package/android/com/facebook/react/react-native/0.64.2-3/react-native-0.64.2-3-sources.jar.md5
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
d6eafef921c1d6bb980df5ff65589919
|
package/android/com/facebook/react/react-native/0.64.2-3/react-native-0.64.2-3-sources.jar.sha1
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
49d62471142ef0c5bfeea4ee2f7b511985540825
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
760a5560f5e65c09433111bf4e0b35bd
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
5c40ce01d1c57f828430185b980d2a1c7f94828a
|