Skip to content

Commit f6fcfc0

Browse files
authored
[tvOS] Fix tvOS not building because of LongPressGestureHandler (#3090)
## Description When building a React Native app for TvOS, the following error is being thrown: ![image](https://github.com/user-attachments/assets/b7b75b92-90ab-45a5-9c1f-416ed414bd92) This PR fixes this issue by wrapping `numberOfPointersRequired` in a platform specific clause to fix the build error. closes: #3089 ## Test plan Try building `TvOS` before and after this change
1 parent b4b909c commit f6fcfc0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

apple/Handlers/RNLongPressHandler.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,10 +233,12 @@ - (void)configure:(NSDictionary *)config
233233
recognizer.allowableMovement = [RCTConvert CGFloat:prop];
234234
}
235235

236+
#if !TARGET_OS_TV
236237
prop = config[@"numberOfPointers"];
237238
if (prop != nil) {
238239
recognizer.numberOfTouchesRequired = [RCTConvert CGFloat:prop];
239240
}
241+
#endif
240242
}
241243

242244
#if !TARGET_OS_OSX

0 commit comments

Comments
 (0)