Summary:
This PR fixes swipe dismissal to work each time the modal is shown. Previously modalInPresentation was set on the view controller which gets destroyed every time user dismisses the modal. This makes sure that modal in presentation is correctly preserved when showing multiple modals.
https://github.com/user-attachments/assets/c7f140e5-1c4f-4809-8453-148d4becc9eb
## Changelog:
[IOS] [FIXED] - modal swipe dismissal works only for the first time
Pull Request resolved: https://github.com/facebook/react-native/pull/53499
Test Plan:
1. Open RN Tester
2. Check allow swipe dismissal
3. Check closing it multiple times
Reviewed By: javache
Differential Revision: D81312918
Pulled By: cipolleschi
fbshipit-source-id: 4f7cc60762660e5d5310f4973fe8df340c1ba52b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53367
We are missing a dependency in the React-jsinspector podspec that prevents React Native from building with dynamic frameworks.
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D80619664
fbshipit-source-id: 1c87ef4d3614ceea3a23196831479ecae0a5acc8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53570
Idle callbacks are implemented as a C++ module in the new architecture, this code should not be used.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D81485912
fbshipit-source-id: 18103bb96441880ff3de423aa6c03a176f6ff5de
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53569
Simplify construction to save a JNI call, slightly more efficient on binary size too (1KiB hah)
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D81445834
fbshipit-source-id: b0ec84d5e04d364e34eef4c3b712c62f878325cf
Summary:
Resolves https://github.com/facebook/react-native/issues/53501
This is a pretty major oversight of (presumably) the old autolinking refactor. The iOS autolinking's second stage, invoked in `use_react_native!` does not accept the `react-native-config` sub-command's `react-native-config` output. This is only invoked and used in the prior step, `use_native_modules`.
The second step instead invokes old code that does something _similar_ to the new autolinking in `scripts/generate-artifacts-executor`, and happens to align in most cases. (But it does "autolinking" from scratch). tl;dr: When the results don't match up, things go wrong.
Instead, we now write the autolinking (react native config) results to a file, then read the output back in the second step.
This doesn't affect Android/Gradle, which are implemented correctly.
## Changelog:
[IOS] [FIXED] - Use autolinking-generated react-native-config output in second step of cocoapods linking that generates artifacts and generated source
Pull Request resolved: https://github.com/facebook/react-native/pull/53503
Test Plan:
- See https://github.com/facebook/react-native/issues/53501 for failing repro
- Clone for working repro: https://github.com/byCedric/react-native-codegen-ios-autolinking/tree/fix-54503
- Note: Contains this PR's changes as a patch
- `bun install`
- `bun expo run:ios`
Reviewed By: cortinico
Differential Revision: D81490755
Pulled By: cipolleschi
fbshipit-source-id: eefe786a116404f4ed24bd7125dfb108a811f71e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53560
Since Gradle 9.0, all the projects in the path must have an existing folder.
As we build :packages:react-native:ReactAndroid, we need to declare the folders
for :packages and :packages:react-native as well as otherwise the build from
source will fail with a missing folder exception.
Changelog:
[Android] [Fixed] - Fix build from source due to missing folder error on Gradle 9.0
Reviewed By: fabriziocucci
Differential Revision: D81482789
fbshipit-source-id: 609b503755486e10060a0f321bd0a38bd71864a1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53566
TLDR; we never advertised this and it's not in use. We have an updated incoming plan for exposing internal private code to Expo / other frameworks.
Changelog: [Internal]
Reviewed By: christophpurrer
Differential Revision: D81490655
fbshipit-source-id: f3d64582f5e6092e4928865d868ea26867ee7e47
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53571
Changes `VirtualView` so that its layout when hidden can be configured by call sites.
Previously, it was hardcoded to only retain the last known height. However, this logic only works for `VirtualView` children oriented in a column layout.
This change enables the use of `VirtualView` in more flexible abstractions that require different hidden styles (e.g. row or grid orientations).
Also, this changes the default behavior to set `minWidth` and `minHeight`, so that the default behavior is more general and more likely to work in a reasonable manner in more use cases.
NOTE: Ideally, we would be able to default to using `flexBasis` instead. However, the `hiddenStyle` function receives a `Rect` and does not know whether the parent's flex direction is row or column to influence whether to use `targetRect.width` or `targetRect.height`. This is an opportunity for future improvement.
Changelog:
[Internal]
Reviewed By: lunaleaps
Differential Revision: D81344126
fbshipit-source-id: 33d9e81601b671059f97b4590816243cbd24734a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53533
Creates a new `enableVirtualViewExperimental` feature flag that determines whether `VirtualView` uses the old or new implementation.
Changelog:
[Internal]
Reviewed By: lunaleaps
Differential Revision: D81340963
fbshipit-source-id: f550fe4e4573e080eb8668077d0ad3ca53cd4d33
Summary:
This PR falls back to UIScreen when windowScene is not available.
<img width="500" alt="CleanShot 2025-08-28 at 14 30 59@2x" src="https://github.com/user-attachments/assets/9dda3153-dfe7-48a5-9d0e-5416c2e34c64" />
## Changelog:
[IOS] [FIXED] - Simplify RCTAlertController, don't create additional UIWindow
Pull Request resolved: https://github.com/facebook/react-native/pull/53500
Test Plan:
Open the alert multiple times to check if everything works as expected.
Rollback Plan:
Reviewed By: javache
Differential Revision: D81410450
Pulled By: cipolleschi
fbshipit-source-id: c27ea98d9e811c2f259f0ff3c6689482d116c418
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53534
BackgroundDrawable and BorderDrawable have already substituted CSSBackgroundDrawable en every Android surface.
- Deleting CSSBackgroundDrawable.java and its callsites
- Deleting enableNewBackgroundAndDrawable featureflag
Just cleaning up what at this point is just dead code.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D81330969
fbshipit-source-id: bcf66ec8d3225802432ae1d93a2b26ea65cfcda0
Summary:
Follow-up to https://github.com/facebook/react-native/issues/53194
This wasn't previously visible in testing without prebuilds and without a release build. This doesn't show up in debug builds.
When testing more against paths that contain spaces, I noticed that release builds can still run into trouble due to the use of `execSync` without escaping paths. While, in other scripts that aren't used in user-projects (afaict), we often escape with quotes and rely on `execSync` calling the shell (due to its `shell: true` default), in some scripts we don't have quote escapes.
That said, since paths could in theory contain quotes, adding quotes wouldn't be sufficient. Instead, since the affected `tar` calls are really trivial, we can instead use `spawnSync` with the `shell: false` default, which escapes arguments automatically.
## Changelog:
[IOS] [FIXED] - fix Node scripts related to prebuilt tarball extraction for paths containing whitespaces
Pull Request resolved: https://github.com/facebook/react-native/pull/53540
Test Plan: - Create a project in a folder `with spaces` and build a release build
Reviewed By: cipolleschi, cortinico
Differential Revision: D81406841
Pulled By: robhogan
fbshipit-source-id: 08bb06b2cd2b15dc17c2f95fab9024129deca6f3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53431
Changelog: [internal]
This renames `setUpPerformanceObserver` as `setUpPerformanceModern` and removes the need to call it manually. If the native module is defined, we define the whole new API.
Reviewed By: javache
Differential Revision: D80803626
fbshipit-source-id: ef41cb9aa959ee898d32724c102d7597e6bee84e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53430
Changelog: [internal]
This fixes the spec-compliance of several classes in the Performance API by not allowing userland code to instantiate them directly.
This also exposes some missing interfaces from the Performance API in the global scope.
Reviewed By: rshest
Differential Revision: D80800076
fbshipit-source-id: f6439b9c7914817ef552e78fd61646ccab1e1de2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53429
Changelog: [internal]
This is a refactor of the types in `PerformanceEntry` and subclasses to accept interfaces instead of objects. This allows us to pass down the init object from subclasses to the superclass without having to create intermediate objects.
Additionally, this is also more semantically correct, as existing APIs don't need those options to be own properties of the init object.
Existing benchmark for Performance doesn't show any significant impact.
Reviewed By: rshest
Differential Revision: D80800075
fbshipit-source-id: ab439d70f4db9ce60e3089d89ccb105a91e7ef48
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53428
Changelog: [internal]
This is the last method in `PerformanceObserver` to implement. For some reason we never added it, even though it was trivial.
Reviewed By: rshest
Differential Revision: D80717237
fbshipit-source-id: ae3bd243d0f3f0fe4f0705437d78d14c532515f7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53427
Changelog: [internal]
Migrate the imported types to the globally defined ones, so we follow the good practice of only accessing the public API in Fantom tests.
Reviewed By: rshest
Differential Revision: D80807160
fbshipit-source-id: 77d792b56b53c8da8409dd9133cd111afb8084f1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53433
Changelog: [internal]
This adds the definitions for the Web Performance APIs in the global scope.
Reviewed By: zeyap
Differential Revision: D80811659
fbshipit-source-id: a81117a27a480ba03f8feb2e813a3a66a10307f9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53536
# Changelog: [Internal]
For every chunk, we already have a threshold for the number of samples captured in this chunk.
There could be really tall call stacks, where we could record hundreds of unique nodes, which makes the chunk already big enough for a CDP traffic on android.
We are adding a threshold for a number of unique nodes in a single chunk. If the chunk has a greater number of nodes recorded, it will be dispatched over CDP.
Reviewed By: huntie
Differential Revision: D81339677
fbshipit-source-id: 388d14c64c4c3f60918a8526025f79d19d397cb4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53535
# Changelog: [Internal]
This primarily addressed the case when we have captured a Runtime Profile during the app startup. The Hermes Runtime is created on the main thread, so the first few samples will be recorded there, but then it will be moved to JavaScript thread.
Reviewed By: huntie
Differential Revision: D81339676
fbshipit-source-id: 8202ca03df54134330aa921a9a0a97816c51cea5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53548
Add tests to View similar to D81043503, and clarify why `accessibilityElementsHidden` does not show up in the rendered component tree (because Fantom uses the Android platform for bundling, and Android does not have accessibilityElementsHidden in its BaseViewConfig.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D81437063
fbshipit-source-id: aa10573aee686d1d650b152365607877f34f8508
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53530
Deprecate the `StyleSheet.absoluteFillObject` API in favour of `StyleSheet.absoluteFill` (functionally identical).
Secondly, refine the type definitions in our source code (and Strict TS API) from `any` → `AbsoluteFillStyle` — resolves https://github.com/facebook/react-native/issues/53470.
This will be followed with updates to our docs.
Changelog:
[General][Deprecated] - `StyleSheet.absoluteFillObject` is deprecated in favor of `StyleSheet.absoluteFill` (equivalent).
Reviewed By: yungsters
Differential Revision: D81327548
fbshipit-source-id: 2bcf14694dc1bd959419629ce717760086b80ec3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53454
Let's deprecate all the classes that aren't used by interop or the new architecture.
Changelog: [General][Deprecated] - Deprecate all the c++ classes not used by interop, or the new architecture.
Reviewed By: arushikesarwani94
Differential Revision: D80575767
fbshipit-source-id: 1d485300cbe24260d77bbeac75fe5b839121b6c8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53521
Make `jsi::Object` constructor explicit, so its creation is explicit and
intentional. This prevents any sad foot-gun of constructing an Object
implicitly from a Runtime, which is certainly not a JS object.
Changelog: [Internal]
Reviewed By: avp
Differential Revision: D81274439
fbshipit-source-id: 5a9d9907f9deff7625dcff9c1072eb135ab7840e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53523
update `DisplayMetricsHolder.getWindowDisplayMetrics()` to `getScreenDisplayMetrics()`.
Where window width and height is not needed, prefer to use `screenDisplayMetrics` as with upcoming diff `windowDisplayMetrics` initialization only happen using UiContext and have potential to cause more issues if used unnecessarily.
Changelog: [Internal] Update `DisplayMetricsHolder.getWindowDisplayMetrics()` to use `.getScreenDisplayMetrics()`
---
Reviewed By: mlord93
Differential Revision: D81270196
fbshipit-source-id: 5b392d67449ddceebbc0fe81db15fa61ae44108f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53397
This is a runtime behaviour fix and an API change to `Appearance.setColorScheme`, motivated by a user report where providing `'unspecified'` (valid) to this function would trigger an incorrect invariant throw. Furthermore, there is already a [first party use](https://github.com/facebook/react-native/blob/aec35b896053d9372ccdaf67c939b2eb216d3455/packages/react-native/Libraries/Utilities/Appearance.js#L101) where we call `Appearance.setColorScheme('unspecified')`.
**Changes**
- `Appearance.d.ts` (current public API, manual types): Fix `ColorSchemeName` type to include `'unspecified'` value, and narrow to remove nullability — aligning with existing Flow source for this type in `NativeAppearance`.
- `Appearance.js` (implementation): Fix the invariant throw by **removing it**, and instead narrowing the input type to non-nullable. Redundant work in `getState` and `getColorScheme` is removed.
Changelog: [General][Breaking] `Appearance.setColorScheme` no longer accepts a nullable value
Reviewed By: andrewdacenko
Differential Revision: D80705652
fbshipit-source-id: cf221a33447606653050d471ca2d0347ab30db81
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53514
Changelog: [Internal]
Add a way to ignore unusually early timestamps, in our example those are artificial marks to create web tracks in correct order, coming from console.timeStamp via React. These markers are ignore in RNDT on Chrome, but not excluded in perfetto.
Reviewed By: hoxyq
Differential Revision: D81246527
fbshipit-source-id: d3342036698d1607c98e5bb4273ea1a3716fcb03
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53492
Changelog: [Internal]
Goal is to simplify code and to lower the JNI payload
- Send values as `int` instead of `Double` if they are converted to `int` on the Java side
- We only have 2 optional values - all others are mandatory
Reviewed By: lenaic
Differential Revision: D81202196
fbshipit-source-id: df8b7d9e6a98e7c919de9be6a277876684f0383c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53328
Disables the legacy performance overlay toggle from the Android DevMenu to make way for V2.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D79791703
fbshipit-source-id: c99ac95e2907ce978ef0c2711ad304c9a3f278ec