Summary:
`NSUnderlinePatternDash`/`NSUnderlinePatternDot` are [deprecated](https://developer.apple.com/documentation/uikit/nsunderlinepatterndash). Use their drop-in replacements (`NSUnderlineStylePatternDash` and `NSUnderlineStylePatternDot`) instead.
## Changelog:
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[IOS] [DEPRECATED] - Update deprecated enums in RCTTextPrimitivesConversions.h
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
Pull Request resolved: https://github.com/facebook/react-native/pull/49648
Test Plan: Local build
Reviewed By: cortinico
Differential Revision: D70153675
Pulled By: cipolleschi
fbshipit-source-id: e64c9df1a5282a3f33f742a455c64c002f0c8044
Summary:
After this change: https://github.com/facebook/react-native/pull/49078 UIWindowSceneDelegate is no longer needed.
This wasn't removed in the original PR.
## Changelog:
[iOS] [Removed] - Remove no longer needed UISceneDelegate
Pull Request resolved: https://github.com/facebook/react-native/pull/49628
Test Plan: CI GREEN
Reviewed By: cortinico
Differential Revision: D70102384
Pulled By: cipolleschi
fbshipit-source-id: e33185a4becd949a9f0ec1eabeeb4fe85ef3ee79
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49516
Merge global.d.ts and globals.d.ts into one file and align some definitions with implementations.
Changelog:
[General][Changed] - Improve TypeScript types for `global` objects
Reviewed By: huntie
Differential Revision: D69772463
fbshipit-source-id: 4771e27a97e1e9cbc33d8f75ba11cffd4d200124
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49637
The dtslint requires that the minimum typescript version of 4.9 is used.
Changelog:
[General][Changed] - Increase minimum typescript version in index.d.ts
Reviewed By: huntie
Differential Revision: D69749044
fbshipit-source-id: be255d108c2e9e9452808ba3dea981a7fac0bc21
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49655
This tripped me up since this if hits for TextViews in general, not just EditText
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D70139349
fbshipit-source-id: 1993dda4c6472265c5e61fa4cad4f2beaf4a9930
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49654
This is a lint error, so figured I would fix it
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D70138099
fbshipit-source-id: 489bedc28ac15bed8f98cc3eceb9e393cd4598e7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49587
This is a reland diff for D69805065.
The problems with the original diff were:
- wrong header search path in the `React-NativeModuleApple.podspec`
- adding an implementation `RuntimeExecutor.cpp` file to implement a function that is used by an inline function in the `RuntimeExecutor.h`.
I believe that the last point specifically was creating issues to the linker which was not able to resolve the symbols properly in transitive dependencies.
The fix was to move the implementation of `getMainThreadMutex` to be `inline`.
## Changelog:
[Internal]
Reviewed By: cipolleschi
Differential Revision: D69922771
fbshipit-source-id: 285ce1f232e8c94b99d80aafe1ffbc473921d52f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49639
Changelog: [internal]
This refactors some code in the performance API and Perfetto to avoid doing unnecessary work when not tracing (e.g.: string manipulation for tracks).
It also reduces the cost of logging marks/measures to tracing backends if not actively tracing (e.g.: moving the check to outside the lock).
Reviewed By: bgirard
Differential Revision: D69246772
fbshipit-source-id: 141a13f609f12be7ab8ca00f7aa1892b34770bbb
Summary:
Fixes assert crash in https://github.com/facebook/react-native/issues/46568#issuecomment-2653747732.
We can temporarily downgrade _LIBCPP_HARDENING_MODE to _LIBCPP_HARDENING_MODE_EXTENSIVE, it disables strict weak ordering check in debug mode. Actually, when we sort animation mutations, we don't need it to satisfy strict weak ordering.
https://libcxx.llvm.org/Hardening.html#id3
Another solution is we make sort satisfy it, but we don't have any key to compare when two mutation is the same mutation type but not the same parentTag. Maybe we can use pointer of muation to compare?
## Changelog:
[IOS] [FIXED] - Fabric: disable React-Fabric stable_sort strict weak sort check in debug mode
Pull Request resolved: https://github.com/facebook/react-native/pull/49422
Test Plan: Fixes https://github.com/facebook/react-native/issues/46568#issuecomment-2653747732.
Reviewed By: sammy-SC
Differential Revision: D69984937
Pulled By: cipolleschi
fbshipit-source-id: 2a3d17970def513c4ba915068f25338169db82d6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49559
## Motivation
Modernising the RN codebase to allow for modern Flow tooling to process it.
## This diff
Renames `Animated.js` to `AnimatedExports.js`, and introduces an intermediate file that reexports `* as Animated` as a default. This should have equivalent runtime behavior, but allows for a common interface file: `Animated.js.flow` to reinterpret the module as having single exports. TypeScript treats this as a namespace.
Changelog: [Internal]
Reviewed By: huntie
Differential Revision: D69849314
fbshipit-source-id: cdaa605ba5361d3349c6dd0e84fd0fbfee263941
Summary:
## Summary
The `flow-api-translator` from the `hermes` repo does not support flow
type spreads. It is currently not able to digest the ReactNativeTypes
file as it contains unsupported syntax. The simplest solution is to
change the type of the `TouchedViewDataAtPoint` to equivalent, yet
supported by the Flow tooling. In this case the intersection can be used
as
the `TouchedViewDataAtPoint` and `InspectorData` have no common
property.
## How did you test this change?
Run yarn flow native
DiffTrain build for [e670e72fa076449e40172e20d17cc67c1c15419c](https://github.com/facebook/react/commit/e670e72fa076449e40172e20d17cc67c1c15419c)
Reviewed By: rickhanlonii
Differential Revision: D69661050
fbshipit-source-id: 1732bd9ac9c1af1e4c0b95758e92d9ccf3b807e6
Summary:
fix: https://github.com/facebook/react-native/issues/49368
description is provided inside the ticket.
When we use TextInput on ios and manage selection with the selection prop, TextInput is reset when we change selection.
## Changelog:
[IOS] [FIXED] - Fix selection makes TextInput clear its content when using children
Pull Request resolved: https://github.com/facebook/react-native/pull/49450
Test Plan:
Tested with sample provided in ticket.
I also test it with my app on both android and ios, but I cannot share video
Reviewed By: sammy-SC
Differential Revision: D69984616
Pulled By: cipolleschi
fbshipit-source-id: a17169608f9df0ea1cb579e6038345f8e48bbc27
Summary:
The js prop name is `shouldRasterizeIOS` https://reactnative.dev/docs/view#shouldrasterizeios-ios, so we should change the prop name when parsing the props.
## Changelog:
[IOS] [FIXED] - Fabric: Fixes shouldRasterizeIOS prop of View not work on iOS
Pull Request resolved: https://github.com/facebook/react-native/pull/49615
Test Plan:
Enable `shouldRasterizeIOS` should work in Fabric:
```
<View shouldRasterizeIOS={true}>
```
Reviewed By: rshest
Differential Revision: D70085480
Pulled By: javache
fbshipit-source-id: 499524b7812f932b0da4a4f239ff6a79043b2f87
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49629
I don't think `RCTSampleTurboCxxModule_v1` does anything useful anymore since we no longer use the `getTurboModuleWithJsInvoker:` API anywhere.
Changelog: [Internal]
Reviewed By: sammy-SC
Differential Revision: D70088150
fbshipit-source-id: 6391531c412dec18c63948db883aba07ab21499e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49602
Changelog: [internal]
This just prepares for the removal of some types from `ReactNativeTypes`, and defines some types in `ReactNativePrivateInterface` that `ReactNativeTypes` expects to be defined after https://github.com/facebook/react/pull/32446
Reviewed By: huntie
Differential Revision: D69996009
fbshipit-source-id: 3c156b4dede8e217d6a828ab310533a2f8bfd42c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49601
Changelog: [internal]
This creates a new module in React Native to define some of the types related to `HostInstance` that are currently defined in `ReactNativeTypes` (synced from the React repo).
We want to remove the types from `ReactNativeTypes` so this is a necessary initial step.
Reviewed By: huntie
Differential Revision: D69996010
fbshipit-source-id: 21cfed4c222e22332936e56aca895fe578809792
Summary:
`TextInput` component has been missing support for `numberOfLines` prop on iOS, this PR adds it.
## Changelog:
[IOS] [ADDED] - Add support for `numberOfLines` prop on `TextInput`
Pull Request resolved: https://github.com/facebook/react-native/pull/49549
Test Plan: Tested on RNTester and added a new case utilizing the prop
Reviewed By: cipolleschi
Differential Revision: D69915133
Pulled By: j-piasecki
fbshipit-source-id: b6a86bc64bd3c2129a64e99c9bcec9cf5bfde3bc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49618
Changelog:
[General][Internal] - create a heartbeat for device, and not only for debugger.
Introducing a heartbeat for the connection between the proxy and the device similarly to the one between the proxy and the debugger. This will allow us to:
* Most importantly I'd like to track the ping-pong roundtrip to the device as well, to see if we have any anomalies there
* Terminate the connection if it is abandoned for 60seconds- this might have a real effect in some case where the device runs remotely
* Also keep that connection alive if the other side disconnects after a period of inactivity. While a no-op in our case, this is an implementation detail. It is a no-op because the WebSocket on the Device is implemented by us and is not supposed to drop connections like the browser does.
Reviewed By: robhogan
Differential Revision: D69990715
fbshipit-source-id: 6bb3a2ed3eaffff9535aa2d0fc8cff0262af022f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49612
`[UIApplication sharedApplication]` is not allowed in Mac Catalyst. This #ifdef's it out which is a common pattern elsewhere.
Changelog: [Internal]
Reviewed By: shwanton
Differential Revision: D69971189
fbshipit-source-id: 89dbc0a02ed2a06936f910fbfc13e1fb91972540
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49605
changelog: [internal]
Calling `RCTUnsafeExecuteOnMainQueueSync` while holding a lock can lead to a deadlock. In this diff, we remove it from RCTKeyWindowValuesProxy.
Reviewed By: javache
Differential Revision: D69997888
fbshipit-source-id: a09fc641c9fb2aec59aef34e4047e1ef11cdaf02
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49381
A much improved version of my previous attempt in D68306316 (https://github.com/facebook/react-native/pull/48773).
Instead of LinkMovementMethod which makes TextViews scrollable if they overflow, this implementation uses `ExploreByTouchHelper`'s `onVirtualViewKeyboardFocusChanged` and `onPerformActionForVirtualView` to handle focus changes and clicks on virtual views (aka spans in our case). This impl will correctly ellipsize text and allow tab to nav through the links.
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D69551206
fbshipit-source-id: 6a88ccd507dc5534c1f494e3303c6bfc2bae5e9f