react-native-tvos 0.72.4-0rc0 → 0.72.4-0rc1

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.
@@ -305,7 +305,8 @@ function Pressable(props: Props, forwardedRef): React.Node {
305
305
  accessibilityLiveRegion,
306
306
  accessibilityLabel,
307
307
  accessibilityState: _accessibilityState,
308
- focusable: focusable !== false,
308
+ focusable:
309
+ focusable !== false && disabled !== true && ariaDisabled !== true,
309
310
  isTVSelectable: isTVSelectable !== false && accessible !== false,
310
311
  accessibilityValue,
311
312
  hitSlop,
@@ -380,7 +381,7 @@ function Pressable(props: Props, forwardedRef): React.Node {
380
381
  if (evt?.eventType === 'focus') {
381
382
  setFocused(true);
382
383
  onFocus && onFocus(evt);
383
- // $FlowFixMe[prop-missing]
384
+ // $FlowFixMe[prop-missing]
384
385
  } else if (evt.eventType === 'blur') {
385
386
  onBlur && onBlur(evt);
386
387
  setFocused(false);
@@ -391,12 +392,12 @@ function Pressable(props: Props, forwardedRef): React.Node {
391
392
  if (Platform.isTVOS) {
392
393
  // $FlowFixMe[prop-missing]
393
394
  if (focused && evt.eventType === 'select') {
394
- // $FlowFixMe[incompatible-exact]
395
+ // $FlowFixMe[incompatible-exact]
395
396
  onPress && onPress(evt);
396
397
  }
397
398
  // $FlowFixMe[prop-missing]
398
399
  if (focused && evt.eventType === 'longSelect') {
399
- // $FlowFixMe[incompatible-exact]
400
+ // $FlowFixMe[incompatible-exact]
400
401
  onLongPress && onLongPress(evt);
401
402
  }
402
403
  }
@@ -426,7 +427,12 @@ function Pressable(props: Props, forwardedRef): React.Node {
426
427
  nextFocusLeft={tagForComponentOrHandle(props.nextFocusLeft)}
427
428
  nextFocusRight={tagForComponentOrHandle(props.nextFocusRight)}
428
429
  nextFocusUp={tagForComponentOrHandle(props.nextFocusUp)}
429
- isTVSelectable={isTVSelectable !== false && accessible !== false}
430
+ isTVSelectable={
431
+ isTVSelectable !== false &&
432
+ accessible !== false &&
433
+ disabled !== true &&
434
+ ariaDisabled !== true
435
+ }
430
436
  style={typeof style === 'function' ? style({pressed, focused}) : style}
431
437
  tvParallaxProperties={tvParallaxProperties}
432
438
  collapsable={false}>
@@ -528,6 +528,13 @@ export interface ScrollViewPropsIOS {
528
528
  * The current scale of the scroll view content. The default value is 1.0.
529
529
  */
530
530
  zoomScale?: number | undefined;
531
+
532
+ /**
533
+ * (TvOS only)
534
+ * Defines if UIScrollView index should be shown when fast scrolling.
535
+ * Defaults to true.
536
+ */
537
+ showsScrollIndex?: boolean;
531
538
  }
532
539
 
533
540
  export interface ScrollViewPropsAndroid {
@@ -355,6 +355,12 @@ type IOSProps = $ReadOnly<{|
355
355
  | 'never'
356
356
  | 'always'
357
357
  ),
358
+ /**
359
+ * (TvOS only)
360
+ * Defines if UIScrollView index should be shown when fast scrolling.
361
+ * Defaults to true.
362
+ */
363
+ showsScrollIndex?: ?boolean,
358
364
  |}>;
359
365
 
360
366
  type AndroidProps = $ReadOnly<{|
@@ -1796,6 +1802,8 @@ class ScrollView extends React.Component<Props, State> {
1796
1802
  snapToStart: this.props.snapToStart !== false,
1797
1803
  // default to true
1798
1804
  snapToEnd: this.props.snapToEnd !== false,
1805
+ // default to true
1806
+ showsScrollIndex: this.props.showsScrollIndex !== false,
1799
1807
  // pagingEnabled is overridden by snapToInterval / snapToOffsets
1800
1808
  pagingEnabled: Platform.select({
1801
1809
  // on iOS, pagingEnabled must be set to false to have snapToInterval / snapToOffsets work
@@ -149,6 +149,7 @@ export const __INTERNAL_VIEW_CONFIG: PartialViewConfig =
149
149
  scrollsToTop: true,
150
150
  showsHorizontalScrollIndicator: true,
151
151
  showsVerticalScrollIndicator: true,
152
+ showsScrollIndex: true,
152
153
  snapToAlignment: true,
153
154
  snapToEnd: true,
154
155
  snapToInterval: true,
@@ -68,6 +68,7 @@ export type ScrollViewNativeProps = $ReadOnly<{
68
68
  scrollsToTop?: ?boolean,
69
69
  sendMomentumEvents?: ?boolean,
70
70
  showsHorizontalScrollIndicator?: ?boolean,
71
+ showsScrollIndex?: ?boolean,
71
72
  showsVerticalScrollIndicator?: ?boolean,
72
73
  snapToAlignment?: ?('start' | 'center' | 'end'),
73
74
  snapToEnd?: ?boolean,
@@ -72,6 +72,7 @@ const ScrollViewViewConfig = {
72
72
  scrollsToTop: true,
73
73
  sendMomentumEvents: true,
74
74
  showsHorizontalScrollIndicator: true,
75
+ showsScrollIndex: true,
75
76
  showsVerticalScrollIndicator: true,
76
77
  snapToAlignment: true,
77
78
  snapToEnd: true,
@@ -13,5 +13,5 @@ exports.version = {
13
13
  major: 0,
14
14
  minor: 72,
15
15
  patch: 4,
16
- prerelease: '0rc0',
16
+ prerelease: '0rc1',
17
17
  };
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ## react-native-tvos
2
2
 
3
- Going forward, Apple TV and Android TV support for React Native will be maintained here and in the corresponding `react-native-tvos` NPM package, and not in the [core repo](https://github.com/facebook/react-native/). This is a full fork of the main repository, with only the changes needed to support Apple TV and Android TV.
3
+ Apple TV and Android TV support for React Native are maintained here and in the corresponding `react-native-tvos` NPM package, and not in the [core repo](https://github.com/facebook/react-native/). This is a full fork of the main repository, with only the changes needed to support Apple TV and Android TV.
4
4
 
5
5
  Releases of `react-native-tvos` will be based on a public release of `react-native`; e.g. the 0.72.4-0 release of this package will be derived from the 0.72.4 release of `react-native`. All releases of this repo will follow the 0.xx.x-y format, where x digits are from a specific RN core release, and y represents the additional versioning from this repo.
6
6
 
@@ -22,15 +22,8 @@ As of the 0.71 release, Hermes is fully working on both Apple TV and Android TV,
22
22
 
23
23
  ### React Native new architecture (Fabric) support
24
24
 
25
- Before creating a new project, or running `pod install` in an existing project using version 0.69.5-0 or higher, execute
26
-
27
- ```sh
28
- export RCT_NEW_ARCH_ENABLED=1
29
- ```
30
- Notes:
31
-
32
- - _Apple TV_: `pod install` will pick up the additional pods needed for the new architecture. There are some issues with interactions between Apple TV parallax properties implementation and the new renderer. TabBarIOS has not been reimplemented in the new architecture so it will show up as an "unimplemented component".
33
- - _Android TV_: As in the core repo, Android builds use prebuilt artifacts published in Maven Central.
25
+ - _Apple TV_: Set the environment variable `RCT_FABRIC_ENABLED=1`, or modify your app's Podfile to set the `:fabric_enabled` value to `true` in both iOS and tvOS targets. After that, run `pod install` to pick up the additional pods needed for the new architecture. Some components (TVTextScrollView, TabBarIOS) have not been reimplemented in the new architecture so they will show up as an "unimplemented component".
26
+ - _Android TV_: To enable Fabric, modify `android/gradle.properties` in your app and set `newArchEnabled=true`, then rebuild your app.
34
27
 
35
28
  ### Typescript
36
29
 
@@ -48,25 +41,19 @@ TV device support has been implemented with the intention of making existing Rea
48
41
 
49
42
  The RNTester app supports Apple TV and Android TV. In this repo, `RNTester/Podfile` and `RNTester/RNTesterPods.xcodeproj` have been modified to work for tvOS. Run `pod install`, then open `RNTesterPods.xcworkspace` and build.
50
43
 
51
- ## Pitfall
52
-
53
- Make sure you do not globally install `react-native` or `react-native-tvos`. You should only install `@react-native-community/cli` to use the commands below. If you have done this the wrong way, you may get error messages like:
54
-
55
- ```
56
- ld: library not found for -lPods-TestApp-tvOS
57
- ```
58
44
 
59
45
  You should also install `yarn` globally, as it should be used instead of `npm` for working in React Native projects.
60
46
 
61
47
  ## Build changes
62
48
 
63
- - _Native layer_: React Native Xcode projects all now have Apple TV build targets, with names ending in the string '-tvOS'.
64
- - _react-native init_: Creating a new project that uses this package is done using the react-native CLI. New projects created this way will automatically have properly configured Apple TV targets created in their XCode projects.
65
- - _Maven artifacts_: In 0.71, the React Native Android prebuilt archives are published to Maven instead of being included in the NPM. We are following the same model, except that the Maven artifacts will be in group `io.github.react-native-tvos` instead of `com.facebook.react`. The `react-native-gradle-plugin` has been upgraded so that the Android dependencies will be detected correctly during build.
49
+ - _Native layer for Apple TV_: React Native Xcode projects all now have Apple TV build targets, with names ending in the string '-tvOS'.
50
+ - _Maven artifacts for Android TV_: In 0.71, the React Native Android prebuilt archives are published to Maven instead of being included in the NPM. We are following the same model, except that the Maven artifacts will be in group `io.github.react-native-tvos` instead of `com.facebook.react`. The `@react-native/gradle-plugin` module has been upgraded so that the Android dependencies will be detected correctly during build.
66
51
 
67
52
  ## New project creation
68
53
 
69
- To use this NPM package in a new project, you can reference it as in the following example using the React Native community CLI:
54
+ > _Pitfall:_ Make sure you do not globally install `react-native` or `react-native-tvos`. You should only install `@react-native-community/cli` to use the commands below. If you have done this the wrong way, you may get error messages like `ld: library not found for -lPods-TestApp-tvOS`.
55
+
56
+ Creating a new project that uses this package is done using the react-native CLI. New projects created this way will automatically have properly configured Apple TV targets created in their XCode projects. To use this NPM package in a new project, you can reference it as in the following example using the React Native community CLI:
70
57
 
71
58
  ```sh
72
59
  # Make sure you have the CLI installed globally (this only needs to be done once on your system)
@@ -75,17 +62,24 @@ npm install -g @react-native-community/cli
75
62
  react-native init TestApp --template=react-native-tvos@latest
76
63
  # Now start the app in the tvOS Simulator - this will only work on a macOS machine
77
64
  cd TestApp && react-native run-ios --simulator "Apple TV" --scheme "TestApp-tvOS"
65
+ # The Expo CLI may also be used -- see below for more details
78
66
  ```
79
67
 
68
+ ## Expo CLI support
69
+
80
70
  To run Apple TV (and Android TV) targets from the command line, it is now possible to use the Expo CLI, using the following steps:
81
71
 
82
- - In your app, install the required Expo modules: `yarn add expo`
72
+ - In your app, install the required Expo module: `yarn add expo`
83
73
  - Add a file `react-native.config.js` at the top level of your app directory, with [these contents](https://github.com/byCedric/custom-prebuild-example/blob/main/app/react-native.config.js).
84
74
  - Then an Apple TV target can be run: `npx expo run:ios --scheme MyApp-tvOS --device "Apple TV"`
85
75
  - To run Android TV: `npx expo run:android`
76
+ - The above features are now built into
77
+
86
78
  See [this document](https://docs.expo.dev/bare/using-expo-cli/) for more details on Expo CLI functionality. Note that many of these features require that Expo SDK modules be built into your app, which is not yet supported on Apple TV.)
87
79
 
88
- - _JavaScript layer_: Support for Apple TV has been added to `Platform.ios.js`. You can check whether code is running on AppleTV by doing
80
+ ## Code changes
81
+
82
+ - _JavaScript layer_: Support for TV has been added to the `Platform` React Native API.
89
83
 
90
84
  ```javascript
91
85
  var Platform = require('Platform');
@@ -96,19 +90,21 @@ var running_on_tv = Platform.isTV;
96
90
  var running_on_apple_tv = Platform.isTVOS;
97
91
  ```
98
92
 
99
- ## Code changes
100
93
 
101
- - _General support for tvOS_: Apple TV specific changes in native code are all wrapped by the TARGET_OS_TV define. These include changes to suppress APIs that are not supported on tvOS (e.g. web views, sliders, switches, status bar, etc.), and changes to support user input from the TV remote or keyboard.
102
94
 
103
- - _Common codebase_: Since tvOS and iOS share most Objective-C and JavaScript code in common, most documentation for iOS applies equally to tvOS.
95
+ - _Common codebase for iOS and tvOS_: Since tvOS and iOS share most Objective-C and JavaScript code in common, most documentation for iOS applies equally to tvOS. Apple TV specific changes in native code are all wrapped by the TARGET_OS_TV define. These include changes to suppress APIs that are not supported on tvOS (e.g. web views, sliders, switches, status bar, etc.), and changes to support user input from the TV remote or keyboard.
104
96
 
105
- - _Access to touchable controls_: When running on Apple TV, the native view class is `RCTTVView`, which has additional methods to make use of the tvOS focus engine. The `Touchable` mixin has code added to detect focus changes and use existing methods to style the components properly and initiate the proper actions when the view is selected using the TV remote, so `TouchableWithoutFeedback`, `TouchableHighlight` and `TouchableOpacity` will "just work". In particular:
97
+ - _Common codebase for Android phone and Android TV_: Apps built for Android using this repo will run on both Android phone and Android TV. Most of the changes for TV are specific to handling focus-based navigation on a TV using the D-Pad on the remote control.
98
+
99
+ - _Access to touchable controls_: The `Touchable` mixin has code added to detect focus changes and use existing methods to style the components properly and initiate the proper actions when the view is selected using the TV remote, so `TouchableWithoutFeedback`, `TouchableHighlight` and `TouchableOpacity` will "just work" on both Apple TV and Android TV. In particular:
106
100
 
107
101
  - `onFocus` will be executed when the touchable view goes into focus
108
102
  - `onBlur` will be executed when the touchable view goes out of focus
109
103
  - `onPress` will be executed when the touchable view is actually selected by pressing the "select" button on the TV remote.
110
104
 
111
- - _TV remote/keyboard input_: A native class, `RCTTVRemoteHandler`, sets up gesture recognizers for TV remote events. When TV remote events occur, this class fires notifications that are picked up by `RCTTVNavigationEventEmitter` (a subclass of `RCTEventEmitter`), that fires a JS event. This event will be picked up by instances of the `TVEventHandler` JavaScript object. Application code that needs to implement custom handling of TV remote events can create an instance of `TVEventHandler` and listen for these events. In 0.63.1-1, we have added `useTVEventHandler`, which wraps `useEffect` to make this more convenient and simpler for use with functional components. In 0.64.2-2, we added a TV event display to the new app template using `useTVEventHandler`.
105
+ - _Pressable controls_: The `Pressable` API works with TV. Additional `onFocus` and `onBlur` props are provided to allow you to customize behavior when a Pressable enters or leaves focus. Similar to the `pressed` state that is true while a user is pressing the component on a touchscreen, the `focused` state will be true when it is focused on TV. `PressableExample` in RNTester has been modified appropriately.
106
+
107
+ - _TV remote/keyboard input_: Application code that needs to implement custom handling of TV remote events can create an instance of `TVEventHandler` and listen for these events. For a more convenient API, we provide `useTVEventHandler`.
112
108
 
113
109
  ```javascript
114
110
 
@@ -177,21 +173,17 @@ class Game2048 extends React.Component {
177
173
  }
178
174
  ```
179
175
 
180
- - _Turbomodules_: Working as of the 0.61.2-0 release.
181
-
182
- - _Flipper_: Working in the 0.62.2-x releases. Working in the 0.63.x releases; however, tvOS requires the Flipper pods from 0.62.2-x. `scripts/react_native_pods.rb` contains macros for both versions. The new project template Podfile is correctly set up to provide the older Flipper for both iOS and tvOS targets. In 0.64.x and later, Flipper support is removed until issues can be resolved with newer Xcode versions.
183
-
184
- - _LogBox_: The new LogBox error/warning display (which replaced YellowBox in 0.63) is working as expected in tvOS, after a few adjustments to make the controls accessible to the focus engine.
176
+ - _Flipper_: We do not support Flipper.
185
177
 
186
- - _Pressable_: The new `Pressable` API for React Native 0.63 works with TV. Additional `onFocus` and `onBlur` props are provided to allow you to customize behavior when a Pressable enters or leaves focus. Similar to the `pressed` state that is true while a user is pressing the component on a touchscreen, the `focused` state will be true when it is focused on TV. `PressableExample` in RNTester has been modified appropriately.
178
+ - _LogBox_: The new LogBox error/warning display (which replaced YellowBox in 0.63) is working as expected on TV platforms, after a few adjustments to make the controls accessible to the focus engine.
187
179
 
188
- - _Dev Menu support_: On the simulator, cmd-D will bring up the developer menu, just like on iOS. To bring it up on a real Apple TV device, make a long press on the play/pause button on the remote. (Please do not shake the Apple TV device, that will not work :) )
180
+ - _Dev Menu support_: On the Apple TV simulator, cmd-D will bring up the developer menu, just like on iOS. To bring it up on a real Apple TV device, make a long press on the play/pause button on the remote. (Please do not shake the Apple TV device, that will not work :) ). Android TV dev menu behavior is the same as on Android phone.
189
181
 
190
- - _TV remote animations_: `RCTTVView` native code implements Apple-recommended parallax animations to help guide the eye as the user navigates through views. The animations can be disabled or adjusted with new optional view properties.
182
+ - _TV remote animations on Apple TV_: `RCTTVView` native code implements Apple-recommended parallax animations to help guide the eye as the user navigates through views. The animations can be disabled or adjusted with new optional view properties.
191
183
 
192
- - _Back navigation with the TV remote menu button_: The `BackHandler` component, originally written to support the Android back button, now also supports back navigation on the Apple TV using the menu button on the TV remote.
184
+ - _Back navigation with the TV remote menu button_: The `BackHandler` component, originally written to support the Android back button, now also supports back navigation on the Apple TV using the menu button or '<' button on the Apple TV remote, and the back button as usual on Android TV remote.
193
185
 
194
- - _TVEventControl_: (Formerly "TVMenuControl") (Apple TV only) This module provides methods to enable and disable features on the Apple TV Siri remote:
186
+ - _TVEventControl for AppleTV_: (Formerly "TVMenuControl") This module provides methods to enable and disable features on the Apple TV Siri remote:
195
187
  - `enableTVMenuKey`/`disableTVMenuKey`: Method to enable and disable the menu key gesture recognizer, in order to fix an issue with Apple's guidelines for menu key navigation (see https://github.com/facebook/react-native/issues/18930). The `RNTester` app uses these methods to implement correct menu key behavior for back navigation.
196
188
  - `enableTVPanGesture`/`disableTVPanGesture`: Methods to enable and disable detection of finger touches that pan across the touch surface of the Siri remote. See `TVEventHandlerExample` in the `RNTester` app for a demo.
197
189
  - `enableGestureHandlersCancelTouches`/`disableGestureHandlersCancelTouches`: Methods to turn on and turn off cancellation of touches by the gesture handlers in `RCTTVRemoteHandler` (see #366). Cancellation of touches is turned on (enabled) by default in 0.69 and earlier releases.
@@ -24,7 +24,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(72),
26
26
  RCTVersionPatch: @(4),
27
- RCTVersionPrerelease: @"0rc0",
27
+ RCTVersionPrerelease: @"0rc1",
28
28
  };
29
29
  });
30
30
  return __rnVersion;
@@ -232,6 +232,10 @@ static void RCTSendScrollEventForNativeAnimations_DEPRECATED(UIScrollView *scrol
232
232
  if (oldScrollViewProps.indicatorStyle != newScrollViewProps.indicatorStyle) {
233
233
  _scrollView.indicatorStyle = RCTUIScrollViewIndicatorStyleFromProps(newScrollViewProps);
234
234
  }
235
+
236
+ if (oldScrollViewProps.showsScrollIndex != newScrollViewProps.showsScrollIndex) {
237
+ _scrollView.indexDisplayMode = newScrollViewProps.showsScrollIndex ? UIScrollViewIndexDisplayModeAutomatic : UIScrollViewIndexDisplayModeAlwaysHidden;
238
+ }
235
239
 
236
240
  if (oldScrollViewProps.scrollEventThrottle != newScrollViewProps.scrollEventThrottle) {
237
241
  // Zero means "send value only once per significant logical event".
@@ -56,6 +56,7 @@
56
56
  @property (nonatomic, assign) BOOL snapToEnd;
57
57
  @property (nonatomic, copy) NSString *snapToAlignment;
58
58
  @property (nonatomic, assign) BOOL inverted;
59
+ @property (nonatomic, assign) BOOL showsScrollIndex;
59
60
 
60
61
  // NOTE: currently these event props are only declared so we can export the
61
62
  // event names to JS - we don't call the blocks directly because scroll events
@@ -487,6 +487,18 @@ static inline void RCTApplyTransformationAccordingLayoutDirection(
487
487
  if ([changedProps containsObject:@"contentSize"]) {
488
488
  [self updateContentSizeIfNeeded];
489
489
  }
490
+ if ([changedProps containsObject:@"showsScrollIndex"]) {
491
+ [self updateScrollIndex];
492
+ }
493
+ }
494
+
495
+ - (void)updateScrollIndex
496
+ {
497
+ if (self.showsScrollIndex) {
498
+ self.scrollView.indexDisplayMode = UIScrollViewIndexDisplayModeAutomatic;
499
+ } else {
500
+ self.scrollView.indexDisplayMode = UIScrollViewIndexDisplayModeAlwaysHidden;
501
+ }
490
502
  }
491
503
 
492
504
  - (BOOL)centerContent
@@ -100,6 +100,7 @@ RCT_EXPORT_VIEW_PROPERTY(onScrollEndDrag, RCTDirectEventBlock)
100
100
  RCT_EXPORT_VIEW_PROPERTY(onMomentumScrollBegin, RCTDirectEventBlock)
101
101
  RCT_EXPORT_VIEW_PROPERTY(onMomentumScrollEnd, RCTDirectEventBlock)
102
102
  RCT_EXPORT_VIEW_PROPERTY(inverted, BOOL)
103
+ RCT_EXPORT_VIEW_PROPERTY(showsScrollIndex, BOOL)
103
104
  #if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 /* __IPHONE_13_0 */
104
105
  RCT_EXPORT_VIEW_PROPERTY(automaticallyAdjustsScrollIndicatorInsets, BOOL)
105
106
  #endif
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.72.4-0rc0
1
+ VERSION_NAME=0.72.4-0rc1
2
2
 
3
3
  # GROUP=com.facebook.react
4
4
  # Group for the TV repo
@@ -47,7 +47,7 @@ def hermesDir = System.getenv("REACT_NATIVE_OVERRIDE_HERMES_DIR") ?: new File(re
47
47
  def hermesBuildDir = new File("$buildDir/hermes")
48
48
 
49
49
  def hermesVersion = "main"
50
- def hermesVersionFile = new File(reactNativeRootDir, "node_modules/react-native-core/sdks/.hermesversion")
50
+ def hermesVersionFile = new File(reactNativeRootDir, "../../node_modules/react-native-core/sdks/.hermesversion")
51
51
  if (hermesVersionFile.exists()) {
52
52
  hermesVersion = hermesVersionFile.text
53
53
  }
@@ -18,5 +18,5 @@ public class ReactNativeVersion {
18
18
  "major", 0,
19
19
  "minor", 72,
20
20
  "patch", 4,
21
- "prerelease", "0rc0");
21
+ "prerelease", "0rc1");
22
22
  }
@@ -18,7 +18,7 @@ constexpr struct {
18
18
  int32_t Major = 0;
19
19
  int32_t Minor = 72;
20
20
  int32_t Patch = 4;
21
- std::string_view Prerelease = "0rc0";
21
+ std::string_view Prerelease = "0rc1";
22
22
  } ReactNativeVersion;
23
23
 
24
24
  } // namespace facebook::react
@@ -328,6 +328,15 @@ ScrollViewProps::ScrollViewProps(
328
328
  rawProps,
329
329
  "isInvertedVirtualizedList",
330
330
  sourceProps.isInvertedVirtualizedList,
331
+ {})),
332
+ showsScrollIndex(
333
+ CoreFeatures::enablePropIteratorSetter
334
+ ? sourceProps.showsScrollIndex
335
+ : convertRawProp(
336
+ context,
337
+ rawProps,
338
+ "showsScrollIndex",
339
+ sourceProps.showsScrollIndex,
331
340
  {})) {}
332
341
 
333
342
  void ScrollViewProps::setProp(
@@ -378,6 +387,7 @@ void ScrollViewProps::setProp(
378
387
  RAW_SET_PROP_SWITCH_CASE_BASIC(contentInsetAdjustmentBehavior);
379
388
  RAW_SET_PROP_SWITCH_CASE_BASIC(scrollToOverflowEnabled);
380
389
  RAW_SET_PROP_SWITCH_CASE_BASIC(isInvertedVirtualizedList);
390
+ RAW_SET_PROP_SWITCH_CASE_BASIC(showsScrollIndex);
381
391
  }
382
392
  }
383
393
 
@@ -506,7 +516,11 @@ SharedDebugStringConvertibleList ScrollViewProps::getDebugProps() const {
506
516
  debugStringConvertibleItem(
507
517
  "isInvertedVirtualizedList",
508
518
  snapToEnd,
509
- defaultScrollViewProps.isInvertedVirtualizedList)};
519
+ defaultScrollViewProps.isInvertedVirtualizedList),
520
+ debugStringConvertibleItem(
521
+ "showsScrollIndex",
522
+ snapToEnd,
523
+ defaultScrollViewProps.showsScrollIndex)};
510
524
  }
511
525
  #endif
512
526
 
@@ -70,6 +70,7 @@ class ScrollViewProps final : public ViewProps {
70
70
  ContentInsetAdjustmentBehavior::Never};
71
71
  bool scrollToOverflowEnabled{false};
72
72
  bool isInvertedVirtualizedList{false};
73
+ bool showsScrollIndex{true};
73
74
 
74
75
  #pragma mark - DebugStringConvertible
75
76
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-tvos",
3
- "version": "0.72.4-0rc0",
3
+ "version": "0.72.4-0rc1",
4
4
  "bin": "./cli.js",
5
5
  "description": "A framework for building native apps using React",
6
6
  "license": "MIT",
@@ -1 +1 @@
1
- hermes-2023-08-20-RNv0.72.4-b3854e24660610a8ab0ec9c8fd0a1e3ebe8d7d56
1
+ hermes-2023-08-25-RNv0.72.4-e4a5a201e51cc583b148e8d264a2b061e9408988
@@ -3,16 +3,17 @@
3
3
  "version": "0.0.1",
4
4
  "private": true,
5
5
  "scripts": {
6
- "android": "react-native run-android",
7
- "ios": "react-native run-ios",
6
+ "android": "expo run:android",
7
+ "ios": "expo run:ios",
8
+ "tvos": "expo run:ios --scheme HelloWorld-tvOS --device \"Apple TV\"",
8
9
  "lint": "eslint .",
9
- "start": "react-native start",
10
+ "start": "expo start",
10
11
  "test": "jest"
11
12
  },
12
13
  "dependencies": {
13
14
  "expo": "^49.0.7",
14
15
  "react": "18.2.0",
15
- "react-native": "npm:react-native-tvos@0.72.4-0rc0"
16
+ "react-native": "npm:react-native-tvos@0.72.4-0rc1"
16
17
  },
17
18
  "devDependencies": {
18
19
  "@babel/core": "^7.20.0",
@@ -34,4 +35,4 @@
34
35
  "engines": {
35
36
  "node": ">=16"
36
37
  }
37
- }
38
+ }