Commit Graph

37408 Commits

Author SHA1 Message Date
Christian Falch aaff0d37e2 Updated snapshot 2025-06-25 15:35:20 +02:00
Christian Falch 16a89816fc [ios][prebuild] revert changes in ReactCodegen template
After switching to the new backwards compatible cocoapods structure with prebuilts, we no longer need any change in the ReactCodegen template.

This commit fixes this.
2025-06-25 15:28:14 +02:00
Nicola Corti 04858ecbab Bump AGP to 8.11.0 (#52248)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52248

Just keep the AGP version update.

Changelog:
[Android] [Changed] - Bump AGP to 8.11.0

Reviewed By: rshest

Differential Revision: D77292284

fbshipit-source-id: 2d0bfe1b50e613690bc3cc6b81ae352136543fd4
2025-06-25 03:49:48 -07:00
Christian Falch d8e00f0bb1 Added backwards compatible use of prebuild through cocoapods (#52252)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52252

Instead of declaring two different sets of Pods for prebuilt and build from source, this commit now keeps the pod structure the same for both modes so that consuming libraries can expect to have the same pods and header files available - without this, libraries would have to be updated to take advantage of the prebuilds.

This PR does:
- Added React-Core-prebuilt as a pod in React-Core if prebuilt is enabled
- Simplified react_native_pods to keep pods structure and add React-Core-prebuilt pod if prebuilts are enabled
- Added function for selecting source sets based on prebuilt/build from source

To be able to function both in prebuilt and in regular build from source mode, all podspecs are now using the switch function podspec_sources so that they only include header files if we are in prebuild mode.

Also added React-Core-prebuilt as dependency on React-Core if we are in prebuilt mode so that we install the React.XCFramework.

## Changelog:

[IOS] [FIXED] - Added backwards compatible use of prebuild through cocoapods

Pull Request resolved: https://github.com/facebook/react-native/pull/52223

Test Plan:
Tested in RN-Tester both with and without prebuild.

Rollback Plan:

Reviewed By: cortinico

Differential Revision: D77296047

Pulled By: cipolleschi

fbshipit-source-id: f3eb4d56b2a78bfc8e10ad852746be1ceaf828b2
2025-06-25 03:44:03 -07:00
Christian Falch 07f6f70aef Add missing RCTVibration target in SwiftPM (#52223)
Summary:
`Package.swift` was missing the `RCTVibration` target. This commit adds this target.

## Changelog:

[Internal] - Added RCTVibration to SwiftPM

Pull Request resolved: https://github.com/facebook/react-native/pull/52223

Test Plan: Tested in RN-Tester both with and without prebuild.

Reviewed By: cortinico

Differential Revision: D77257066

Pulled By: cipolleschi

fbshipit-source-id: 13c918387a2ed4a8e3941ddce8b7ba11c24eaab5
2025-06-25 03:44:03 -07:00
Alex Hunt ece8ca82cd Update JS API snapshot to group exports in single block (#52235)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52235

Adds `organizeDeclarations` transform, replacing `sortTypeDefinitions`.

All `export declare ...` statements are now collected and represented at the end of the snapshot in a single `export {}` block — significantly improving readability and diffing.

Changelog: [Internal]

Reviewed By: j-piasecki

Differential Revision: D77150017

fbshipit-source-id: 1bd451c0e2a18fd6fc0504970b10a5d2502ac872
2025-06-25 02:55:42 -07:00
Tim Yung 08a59c59e0 VirtualView: Minimize Events w/ Render State (#52245)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52245

Changes `VirtualView` to avoid dispatching redundant mode change events by reading the last committed `renderState` to determine whether the desired render state is already in effect.

This enables `VirtualView` to avoid dispatching synchronous `Visible` mode change events when a previous `Prerender` mode change event has already been committed.

Changelog:
[Internal]

Reviewed By: lunaleaps

Differential Revision: D77271865

fbshipit-source-id: 75418aec1416995737f308a1beff407f2cedb940
2025-06-25 02:18:52 -07:00
Jakub Piasecki fbd44ade3a Change Animated methods' local names to avoid symbol collisions in the API snapshot (#52219)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52219

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D77221690

fbshipit-source-id: 149711ee8c9d89c50178bf3d41de8b44fbc1d464
2025-06-25 00:16:24 -07:00
Jakub Piasecki 4f94028ca6 Reduce symbol collisions in the API snapshot (#52213)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52213

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D77207979

fbshipit-source-id: 10d8b9c8f24ddb52423197f5aa300402b1e45ebe
2025-06-25 00:16:24 -07:00
generatedunixname89002005287564 0a567a63cd Fix CQS signal modernize-concat-nested-namespaces in xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/jni/first-party/fbgloginit (#52217)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52217

Reviewed By: javache

Differential Revision: D77211475

fbshipit-source-id: 22a89c5211ffc5f9f09ad27dc5e2597c6ceefd99
2025-06-24 22:55:27 -07:00
Tim Yung 19ebd4c188 VirtualView: Prerender w/o Window Focus (#52240)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52240

Changes `VirtualView` to detect when its window is not in a focused window (e.g. scroll position or layout changes when it is blurred) and to instead dispatch an async `Prerender` event instead of a sync `Visible` event.

This minimizes unnecessary main thread synchronous work that is needed for a view that is not important to the user experience.

Changelog:
[Internal]

Reviewed By: mdvacca

Differential Revision: D77261958

fbshipit-source-id: 32acef9bc938005a0d73c5166f1741aebadf23bb
2025-06-24 22:33:07 -07:00
George Zahariev a2a72e239d Enable experimental Flow 'match' syntax for react-native-github/packages/react-native/src/private/components/virtualview/ (#52236)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52236

Enable experimental Flow 'match' syntax for `react-native-github/packages/react-native/src/private/components/virtualview/` and adopt in one case to see if there are any issues.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D77250963

fbshipit-source-id: 0b2a5817a05f3332031f0c0590fe956eaa74ddd3
2025-06-24 17:55:57 -07:00
Cao Doan fedceecc37 Correct some cpp imports (#52212)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52212

Correcting some C++ imports that show up when build with Xcode 26:
- Missing `<string>` imports.
- `<tgmath.h>` is a deprecated C++ header file, which in this case can be substituted with `<cmath>`.

## Changelog: [Internal]

[iOS][Fixed] - Fix deprecated C++ imports

Reviewed By: zhenma

Differential Revision: D77192276

fbshipit-source-id: 30c836947cb3eb54f6e7ac42b87fd2493334a4f4
2025-06-24 15:38:23 -07:00
Sam Zhou e3047db0dc Deploy 0.274.0 to xplat
Summary: Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D77246379

fbshipit-source-id: 4a86da380109e85b5e1d53f5723f6ea07e6ea429
2025-06-24 12:58:53 -07:00
Andrew Datsenko 1e212f91bc Add remaining dependencies (#52202)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52202

Changelog: [Internal]

Build fantom_tester for OSS

Reviewed By: mdvacca

Differential Revision: D76928253

fbshipit-source-id: a95e8751326f45a25cd512b7a5d05260b37a0305
2025-06-24 12:33:59 -07:00
Riccardo Cipolleschi 4f1f72ea34 Fix downloading nightly prebuilds (#52233)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52233

When working on [c1bf39bfdf](https://github.com/facebook/react-native/commit/c1bf39bfdfaa0381be3a20d0d89ce159e482afe1) I forgot to add a `.body` to extract the body from the response.

As a result, we can't install prebuilds in a nightly.

This change fixes this.

## Changelog:
[Internal] -

Reviewed By: realsoelynn

Differential Revision: D77241914

fbshipit-source-id: 013ed927e1a3cd6476a551995577ade80c477dd7
2025-06-24 12:05:51 -07:00
Sam Zhou fe1aacae6d Pre-suppress errors in fbsource ahead of 0.274.0 release (#52232)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52232

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D77230727

fbshipit-source-id: 890b819ffa3ea9996fa11d254215ea1304ba02b4
2025-06-24 11:04:37 -07:00
Jorge Cabiedes Acosta a82b5acf3d Fix jumping talkback triggering scroll when reaching a view with accessibilityOrder (#52231)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52231

Not calling `super.onInitializeAccessibilityNodeInfo` on the host view with accessibilityOrder prevents setting proper dimensions for the node that backs the view which leads TalkBack to trigger scrolling when under a ScrollVIew.

We still need the host's node to not be accessible so we still set it to not be focusable and not have a content description since this should be handled by the virtual views

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D77180494

fbshipit-source-id: fe8794cf421cdc9548cf3e18a62d4bb3e8c26b09
2025-06-24 09:37:36 -07:00
Jorge Cabiedes Acosta 8cc2874d3f Fix View Coopting View edge case on Android (#52066)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52066

Before, to disable views that were excluded from the order we were setting them to be not important for accessibility. This however breaks coopting behavior of parent views, because parent views will not announce content descriptions of children that are not important for accessibility.

Instead of disabling by setting `important for accessibility = no` now we just set `isFocusable = false` which disables focusing but still allows parent views to coopt

We also add functionality to restore view focusability when enabling disabling screen readers since `isFocusable` changes keyboard focusability and when screen readers are disabled we don't want to change it.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D76745057

fbshipit-source-id: cc237c5f8a4b894a7caa3e34207080777de440ac
2025-06-24 09:37:36 -07:00
Alex Hunt d012b2c19b Fix stripUnstableApis to match type alias declarations (#52229)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52229

Changelog: [Internal]

Reviewed By: j-piasecki

Differential Revision: D77148443

fbshipit-source-id: 423da38dfe5ca42e639e274461868a51e9987384
2025-06-24 09:15:53 -07:00
Alex Hunt cfc6960bc4 Update all transforms to apply sequentially (#52228)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52228

To avoid unexpected behaviour, apply all Babel transforms within `build-types` sequentially, so that each transform plugin has an accurate starting AST.

Changelog: [Internal]

Reviewed By: j-piasecki

Differential Revision: D77148444

fbshipit-source-id: f86beac12b7a08ef800e28db1ff88755970cf64e
2025-06-24 09:15:53 -07:00
Alex Hunt ef742dbc68 Subfolder build-types transforms by language (#52230)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52230

Reorganisation/refactoring.

Changelog: [Internal]

Reviewed By: j-piasecki

Differential Revision: D77148446

fbshipit-source-id: fd29c6d47347efd5ad3da933b2112e864064dba7
2025-06-24 09:15:53 -07:00
Alex Hunt 11a1ad7a98 Expose *AnimationConfig types (#52227)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52227

Changelog:
[General][Added] - Expose additional `*AnimationConfig` types on the `Animated` namespace

Differential Revision: D77222030

fbshipit-source-id: 8fd01d820c3c8d6e952a4115578ecc83ae7a0d0f
2025-06-24 08:55:21 -07:00
Alex Hunt b01a5f91fe Expose Animated.InterpolationConfig type (#52224)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52224

Changelog:
[General][Added] - `InterpolationConfig` is now exposed on the `Animated` namespace

Differential Revision: D77222031

fbshipit-source-id: c64c2f348bc899c598ee86c637300037a5a8de6f
2025-06-24 08:55:21 -07:00
Mateo Guzmán 65ae3dafcd Migrate UIManagerHelper to Kotlin (#52209)
Summary:
Migrate com.facebook.react.uimanager.UIManagerHelper to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.uimanager.UIManagerHelper to Kotlin

Pull Request resolved: https://github.com/facebook/react-native/pull/52209

Test Plan:
```bash
yarn test-android
yarn android
```

Reviewed By: javache

Differential Revision: D77210140

Pulled By: cortinico

fbshipit-source-id: 7a6669a6d92d33241d3f42edbabf20170a5a6ddf
2025-06-24 08:06:13 -07:00
Mateo Guzmán d3495fd162 Migrate ReactApplicationContext to Kotlin (#52208)
Summary:
Migrate com.facebook.react.bridge.ReactApplicationContext to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.bridge.ReactApplicationContext to Kotlin

Pull Request resolved: https://github.com/facebook/react-native/pull/52208

Test Plan:
```bash
yarn test-android
yarn android
```

Reviewed By: javache

Differential Revision: D77209812

Pulled By: cortinico

fbshipit-source-id: 2dae094d363e60efe05b4f2b3d55f0f84d921495
2025-06-24 08:03:22 -07:00
Andrew Datsenko 252e1345bf Move fantom into OSS (#52201)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52201

Changelog: [Internal]

Moving fantom tester into OSS.

Reviewed By: rubennorte

Differential Revision: D76928252

fbshipit-source-id: 3faf4a236eacba17896e0a440bac7a5032d063f9
2025-06-24 07:24:41 -07:00
Andrew Datsenko dd1b795abe Introduce react_native_android_dep (#52194)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52194

Changelog: [Internal]

Introducing a way to include sources and deps via function that react_native_android_dep.

This will help with Fantom OSS build.

Reviewed By: cortinico

Differential Revision: D77146189

fbshipit-source-id: 06b09d433741506bc1f58fbf1f9e6add9a9cff91
2025-06-24 07:24:41 -07:00
Mateo Guzmán c125f306c2 Kotlin: fix static code analysis weak warnings (4/n) (#52207)
Summary:
Static code analysis reports several weak warnings, many of which seem to be leftovers after Kotlin migration. This PR addresses quite a few:

- [Redundant curly braces in string template](https://www.jetbrains.com/help/inspectopedia/RemoveCurlyBracesFromTemplate.html)
- [Redundant call to toString() in string template](https://www.jetbrains.com/help/inspectopedia/RemoveToStringInStringTemplate.html)

## Changelog:

[INTERNAL] - Kotlin: fix static code analysis weak warnings (4/n)

Pull Request resolved: https://github.com/facebook/react-native/pull/52207

Test Plan:
```sh
yarn android
yarn test-android
```

Reviewed By: javache

Differential Revision: D77209873

Pulled By: cortinico

fbshipit-source-id: 2bf5fcf7dcbf02632e721aab0688f73d15f220b9
2025-06-24 06:36:11 -07:00
Alex Hunt 03ab6a3098 Add nocommit to V2 JS API snapshot (#52200)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52200

Remains in an experimental format. Add `\nocommit` to prevent accidental inclusion in the repo right now.

Also disable ESLint rule `redundant-undefined/redundant-undefined`.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D77150743

fbshipit-source-id: 645e7db5af2c2a648eef7c8f7e324bc1264b8065
2025-06-24 06:31:04 -07:00
Riccardo Cipolleschi 46b562b9b3 Ship the new React-Core-prebuilt.podspec in the package.json (#52221)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52221

It is currently not possible to use prebuilds, because we are missing the `React-Core-prebuilt.podspec` from the npm package we publish.

This change should fix it.

## Changelog:
[iOS][Added] - Ship the `React-Core-prebuilt.podspec` in the package.json

Reviewed By: cortinico

Differential Revision: D77223271

fbshipit-source-id: ab068e1711fdd86f3f0069dc9aa3c0a591fcd26b
2025-06-24 06:01:36 -07:00
Riccardo Cipolleschi c1bf39bfdf Fix download of nightlies with SwiftPM (#52215)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52215

We were not handling the download of the XML properly. Using `Net::HTTP.get` will directly return the body and that won't let us check on the status code of the response.

## Changelog:
[Internal] - use get_response instead of get when downloading the maven metadata

Reviewed By: cortinico

Differential Revision: D77216121

fbshipit-source-id: 4da0abff1624c687977a7b77db8a15f19e6b887d
2025-06-24 06:01:36 -07:00
nishan (o^▽^o) f238b74658 - Use CAGradientLayer for radial gradient (#52117)
Summary:
This PR replaces Core Graphics implementation with Core Animation for radial gradients. I found that `endPoints` for radial gradient type works differently than linear gradient type. The `endPoint.x` accounts for horizontal length and `endPoint.y` accounts for vertical. This makes it possible to draw ellipse gradients. So we don't need the core graphics API anymore.

## Changelog:

[IOS] [CHANGED] - Optimised Radial Gradients.

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests

Pull Request resolved: https://github.com/facebook/react-native/pull/52117

Test Plan: Non breaking change. Test Radial gradient example from RNTester. Compare results with web, android and iOS. Each platform should render the gradients identically.

Reviewed By: rshest

Differential Revision: D77140709

Pulled By: javache

fbshipit-source-id: 6e3ad9fcf8e819d340ccf5f5946beb140e616cb0
2025-06-24 05:10:30 -07:00
Mateo Guzmán 76e2ab4ac8 Kotlin: fix static code analysis weak warnings (3/n) (#52206)
Summary:
Static code analysis reports several weak warnings, many of which seem to be leftovers after Kotlin migration. This PR addresses quite a few:

- [Return or assignment can be lifted out](https://www.jetbrains.com/help/inspectopedia/LiftReturnOrAssignment.html)
- [Verbose nullability and emptiness check](https://www.jetbrains.com/help/inspectopedia/VerboseNullabilityAndEmptiness.html)
- [Size check can be replaced with 'isNotEmpty()'](https://www.jetbrains.com/help/inspectopedia/ReplaceSizeCheckWithIsNotEmpty.html)

## Changelog:

[INTERNAL] - Kotlin: fix static code analysis weak warnings (3/n)

Pull Request resolved: https://github.com/facebook/react-native/pull/52206

Test Plan:
```sh
yarn android
yarn test-android
```

Reviewed By: javache

Differential Revision: D77209766

Pulled By: cortinico

fbshipit-source-id: c154ec6578125c16ad37c9dd15295a2edcacee4a
2025-06-24 04:55:33 -07:00
Mo Javad 35dba09724 Add explicit Build Tools Version to RN Tester Android App Benchmark (#52216)
Summary:
After bumping to SDK version 36, the build process for Android was still pulling in SDK v35 unnecessarily. This PR fixes that issue.

## Changelog:

[ANDROID] [FIXED] - Added explicit build tool version to RN Tester build.gradle to avoid automatic installation of Android SDK Build Tools.

Pull Request resolved: https://github.com/facebook/react-native/pull/52216

Test Plan:
Tested in fork pipeline to ensure it's working correctly.

This is the logs from the pipeline before:
![image](https://github.com/user-attachments/assets/9dc7f158-8dea-437e-836e-e5f500b3d5ff)

And this is after the fix:
![image](https://github.com/user-attachments/assets/c6cc1c0a-5823-41cb-ba32-027b69d6eaa6)

Reviewed By: rshest

Differential Revision: D77219569

Pulled By: cortinico

fbshipit-source-id: 7a0ca462d00bfc4b015a30807aaef999ff60c719
2025-06-24 04:34:46 -07:00
Mateo Guzmán 9e96acbd0f Kotlin: fix static code analysis weak warnings (2/n) (#52205)
Summary:
Static code analysis reports several weak warnings, many of which seem to be leftovers after Kotlin migration. This PR addresses:

- [Kotlin Java methods should be replaced with Kotlin analog](https://www.jetbrains.com/help/inspectopedia/ReplaceJavaStaticMethodWithKotlinAnalog.html)

## Changelog:

[INTERNAL] - Kotlin: fix static code analysis weak warnings (2/n)

Pull Request resolved: https://github.com/facebook/react-native/pull/52205

Test Plan:
```sh
yarn android
yarn test-android
```

Reviewed By: javache

Differential Revision: D77209667

Pulled By: cortinico

fbshipit-source-id: 09b01a170abf43248b8fdb6a08498d278b9d03bd
2025-06-24 03:40:58 -07:00
Alex Hunt 40b8f4ad22 Adjust source types for better output (#52199)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52199

Minor fixes to naming and generic type compatibility (→ TypeScript).

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D77148914

fbshipit-source-id: 2d3e65170f261b97ea8cf705d1a40a6f7bc5bcc7
2025-06-24 02:57:34 -07:00
George Zahariev 3306691d64 Update hermes-parser and related packages in xplat and socialvr to 0.29.0 (#52211)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52211

Update hermes-parser and related packages in xplat and socialvr to 0.29.0

Changelog: [Internal]

Blocked on: https://fb.workplace.com/groups/relay.support/posts/28766057099682865

Reviewed By: SamChou19815

Differential Revision: D77004095

fbshipit-source-id: 5400ac07c0cbf1f9709d374929d842af9dd15d08
2025-06-23 19:19:50 -07:00
Antonio Pires f184b591cf adding scrollTo, and imperative handle exports for ScrollView (#52204)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52204

Changelog:
[General][Added] - Expose `ScrollViewImperativeMethods` and `ScrollViewScrollToOptions` types to public API

Reviewed By: huntie

Differential Revision: D76920770

fbshipit-source-id: 01b0a2788f7b8a3bad0b57e24b04a7380233ac34
2025-06-23 12:13:02 -07:00
Joe Vilches 62d8d30652 Revamp the accessibility order example in RNTester (#52122)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52122

Would love to have a place with all the edge cases we can come back to when we try and tweak things.

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D76942595

fbshipit-source-id: ce6e293e2c068383e54404af71a29a0586dbc04e
2025-06-23 11:07:52 -07:00
generatedunixname89002005287564 60967fdffb Fix CQS signal modernize-use-nullptr in xplat/js/react-native-github/packages/react-native/ReactCommon/react/renderer/components/textinput/platform/android/react/renderer/components/androidtextinput (#52145)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52145

Reviewed By: javache

Differential Revision: D77010402

fbshipit-source-id: db2823f888b1fca279ff13f8a323e074fcdf61f0
2025-06-23 09:55:44 -07:00
Zane Bauman 4b91b63094 fix: add missing getNativeScrollRef type for ScrollView (#52203)
Summary:
### The Problem

When trying to measure the location of a `View` within a `ScrollView` (ie. for scrolling to the view), the current recommended method is to use `measureLayout` on the nested view to determine its location inside the containing scroll view:

```tsx
const MyComponent = () => {
  const scrollViewRef = useRef<ScrollView>(null);
  const nestedViewRef = useRef<View>(null);

  const scrollToNestedView = () => {
    if (!scrollViewRef.current || !nestedViewRef.current) {
      return;
    }

    nestedViewRef.current.measureLayout(
      scrollViewRef.current.getInnerViewNode(),
      (x, y) => { scrollViewRef.current.scrollTo({ y, animated: true }); },
    );
  }

  return (
    <ScrollView ref={scrollViewRef}>
      <View ref={nestedViewRef}>
        { /* content */ }
      </View>
    </ScrollView>
  );
}
```

This is valid in the Typescript types layer. However, the only two methods on `ScrollView` to use in this scenario that are [available in the type definitions](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Components/ScrollView/ScrollView.d.ts#L830) are `getScrollableNode` and `getInnerViewNode` – both of these methods [return a `number`](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Components/ScrollView/ScrollView.js#L139-L140). The issue is that a `number` not a valid value to use with `measureLayout` because [its source returns early for that type](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js#L91-L102).

(Note, you can also use `findNodeHandle` with the scroll view ref, but this also returns a `number`.)

### The Solution

The long-term solution would be to update the types for both `measureLayout` and `ScrollView`. However, that would constitute a breaking change and require some fairly expansive updates. Instead, I am proposing an additive solution.

`ScrollView` has [a public method called `getNativeScrollRef`](https://github.com/facebook/react-native/blob/e69f0726cd2616fb112d2e4fabfeaafc8cada5d7/packages/react-native/Libraries/Components/ScrollView/ScrollView.js#L142) which returns the underlying `HostInstance`. This method correctly works in the runtime layer, but is not supported in the types layer. This PR exposes the public method in the type definition so that we can properly access the underlying instance without using `ts-ignore`.

## Changelog:[GENERAL] [FIXED] - Expose `ScrollView.getNativeScrollRef` on the type definition to allow accessing the underlying `HostInstance`.

Pull Request resolved: https://github.com/facebook/react-native/pull/52203

Test Plan: None needed. This is only a type update exposing existing functionality.

Reviewed By: cortinico

Differential Revision: D77153959

Pulled By: rshest

fbshipit-source-id: 5880695da85406ed9fe49a1b736b5754db0e6382
2025-06-23 09:55:32 -07:00
generatedunixname89002005287564 7f7655d711 Fix CQS signal modernize-concat-nested-namespaces in xplat/js/react-native-github/packages/react-native/ReactCommon/cxxreact (#52146)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52146

Reviewed By: javache

Differential Revision: D77014011

fbshipit-source-id: 35afa03482c9a4d1fe11325421615a7214337e2a
2025-06-23 09:52:30 -07:00
Dawid Małecki 76e04fac82 Replace shelljs in run-ci-javascript-tests.js (#52095)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52095

This diff removes `shelljs` from `run-ci-javascript-tests.js` and replaces `echo, exec, and exit` methods.

### Motivation

Decrease number of references to `shelljs` across the react-native-github.

Changelog:
[Internal]

Reviewed By: NickGerleman

Differential Revision: D76512374

fbshipit-source-id: 6e02901b570cf9a36bd13a075106a7066a85a2d9
2025-06-23 09:39:44 -07:00
Rubén Norte 18f4db44ef Clean up dead logic in RuntimeScheduler_Modern and simplify logic (#52192)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52192

Changelog: [internal]

When we shipped the event loop we removed the need to run only expired tasks in `RuntimeScheduler_Modern`, but we never cleaned up the code properly. This does it.

Reviewed By: javache

Differential Revision: D77142978

fbshipit-source-id: f808edf80a134f487723fa36ab7a3593e4efe2d3
2025-06-23 08:34:50 -07:00
Rubén Norte 251eb3fd4c Log task ID when scheduling and executing tasks in RuntimeScheduler (#52191)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52191

Changelog: [internal]

Some time ago we added logging for the timer ID in Systrace/Perfetto so we could see where timers were scheduled vs. executed.

This diff adds support for the same functionality for tasks in the runtime scheduler.

Reviewed By: javache

Differential Revision: D77039038

fbshipit-source-id: 792d2fe29b44fb209f9129f46f9d661dad7ebdff
2025-06-23 08:34:50 -07:00
Rubén Norte 3782fe865d Improve tracing metadata for IntersectionObserverManager (#52190)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52190

Changelog: [internal]

This adds some tracing metadata to IntersectionObserver to contextualize the performance of certain operations (logging how many observers it's processing).

Reviewed By: javache

Differential Revision: D77039037

fbshipit-source-id: 9cee79ac0509f57e4658a16142f3fe2d10d71fdf
2025-06-23 08:34:50 -07:00
Rubén Norte 5742227dd8 Add Fantom benchmark for RuntimeScheduler (#52189)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52189

Changelog: [internal]

This creates a benchmark to measure the changes in performance in RuntimeScheduler.

Reviewed By: javache

Differential Revision: D77142979

fbshipit-source-id: 1a6e6824f4c6fdb8d2c5cbad77fb4b8ba406ef29
2025-06-23 08:34:50 -07:00
Christian Falch 90654e4ba2 Integrate React Core prebuilds with apps (#52138)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52138

Integrate React Core prebuilds with apps

## Context
This PR introduces the first working version of building React Native apps on iOS using prebuilt RNCore and cocoapods.

- Added React-Core-prebuilt.podspec for installing/consuming XCFrameworks
- Added logic in react_native_pods.rb for switching between build from source and using prebuilts
- Added rncore.rb - utilities for the ReactCore prebuilts
- Updated rndependencies with some extra error handling modelled after rncode.rb
- Added support for hard linking headers and modules in each inner framework in the XCFramework in xcframework.js

## Swift:
To enable support for the objective-c types from swift, the swift compiler uses a module map to gather exports from the framework (module.modulemap). This file basically points to an umbrella header file that exports the valid objective-c types (non c++) to Swift. In addition these files are read from the DerivedData and not the project source - so it is a bit hard to control everyting.

I was initially not able to use cocoapods own module definitions (module_name, module_file props) to use a custom module map. I finally found that these files are expected in the deriveddata (build folder) where only the active inner framework is copied - so then I had to hard link both module map and header files for each arch.

## Changelog:

[IOS] [ADDED] - Added support for using prebuilt RNCore with Cocoapods

Pull Request resolved: https://github.com/facebook/react-native/pull/52109

Test Plan:
Run with RN Tester. We need to remove all extra pods from RNTester pod file since none of them are yet compatible with prebuilt (they reference non-prebuilt pods)

Rollback Plan:

Reviewed By: cortinico

Differential Revision: D76980286

Pulled By: cipolleschi

fbshipit-source-id: 0ef34599cf7a60e54f799708bce93bcf6fb9d950
2025-06-23 08:13:56 -07:00
Christian Falch 60c01b4715 Update RNDependencies podspec to fail fast if framework is missing (#52134)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52134

Update RNDependencies podspec to fail fast if framework is missing

## Context
This PR introduces the first working version of building React Native apps on iOS using prebuilt RNCore and cocoapods.

- Added React-Core-prebuilt.podspec for installing/consuming XCFrameworks
- Added logic in react_native_pods.rb for switching between build from source and using prebuilts
- Added rncore.rb - utilities for the ReactCore prebuilts
- Updated rndependencies with some extra error handling modelled after rncode.rb
- Added support for hard linking headers and modules in each inner framework in the XCFramework in xcframework.js

## Swift:
To enable support for the objective-c types from swift, the swift compiler uses a module map to gather exports from the framework (module.modulemap). This file basically points to an umbrella header file that exports the valid objective-c types (non c++) to Swift. In addition these files are read from the DerivedData and not the project source - so it is a bit hard to control everyting.

I was initially not able to use cocoapods own module definitions (module_name, module_file props) to use a custom module map. I finally found that these files are expected in the deriveddata (build folder) where only the active inner framework is copied - so then I had to hard link both module map and header files for each arch.

## Changelog:

[IOS] [CHANGED] - Fail fast when pod install i f using prebuild if frameworks are not present in the disk.

Pull Request resolved: https://github.com/facebook/react-native/pull/52109

Test Plan:
Run with RN Tester. We need to remove all extra pods from RNTester pod file since none of them are yet compatible with prebuilt (they reference non-prebuilt pods)

Rollback Plan:

Reviewed By: cortinico

Differential Revision: D76980282

Pulled By: cipolleschi

fbshipit-source-id: 6ab029d0cb06e2f0a3d99ea9fc7b375865e7a966
2025-06-23 08:13:56 -07:00