Commit 52caae5
Delete legacy RCTNativeAnimatedModule from RN iOS
Summary:
The Old Architecture has been deleted from React Native iOS, which makes the
legacy `RCTNativeAnimatedModule` unreachable:
- Its JS spec only requests `'NativeAnimatedModule'` when
`shouldUseTurboAnimatedModule()` is false, but `ReactInstance.cpp` sets
`RN$Bridgeless = true` unconditionally on iOS, so that branch never runs.
- Its only entry points were `-setBridge:` and `RCTUIManagerObserver`, and
`RCTBridge` is now an all-nil stub with `RCTCxxBridge` deleted.
- Nothing referenced it by filename except a single `legacy = True` Buck
plugin provider.
iOS Animated is served by `RCTNativeAnimatedTurboModule` (bridgeless ObjC) and
by the C++ `facebook::react::AnimatedModule` behind `cxxNativeAnimatedEnabled()`.
Deleted `RCTNativeAnimatedModule.h` / `.mm` and its registrations: the
`legacy = True` `react_module_plugin_providers` entry in
`xplat/js/react-native-github/BUCK`, the `RCTNativeAnimatedModuleCls` shim in
the `generated` `RCTAnimationPlugins.{h,mm}`, the `getCoreModuleClasses()`
entry in `RCTBridge.mm`, the `headers-include-baseline.json` entries, and the
`js1 rn-arch` codemod skip-list entry.
With the last bridge-dependent Animated consumer gone, also stripped the dead
bridge plumbing it was the only reason for:
- `RCTNativeAnimatedNodesManager -initWithBridge:surfacePresenter:` loses
`bridge:`.
- `RCTPropsAnimatedNode -connectToView:viewName:bridge:surfacePresenter:` loses
`bridge:` and the `RCTUIManager` fallback in `-updateView`, which collapses to
the single `synchronouslyUpdateViewOnUIThread:props:` call.
- `viewName:` goes too, since it was only used to look up a legacy view
manager. The C++ (`connectAnimatedNodeToView(Tag, Tag)`) and Kotlin
(`connectAnimatedNodeToView(animatedNodeTag, viewTag)`) nodes managers already
take two arguments, and the sole remaining ObjC caller passed `nil`.
`RCTNativeAnimatedTurboModule` is deliberately NOT renamed back to
`RCTNativeAnimatedModule` — that is a much wider rename, best done separately.
Changelog: [INTERNAL]
Differential Revision: D1156636191 parent 22cfb5c commit 52caae5
16 files changed
Lines changed: 154 additions & 672 deletions
File tree
- packages
- react-native
- Libraries/NativeAnimation
- Nodes
- React/Base
- scripts/ios-prebuild
- rn-tester/RNTesterUnitTests
- scripts/cxx-api/api-snapshots
Lines changed: 1 addition & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 16 | + | |
21 | 17 | | |
22 | 18 | | |
23 | 19 | | |
| |||
Lines changed: 3 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | 19 | | |
22 | 20 | | |
23 | 21 | | |
| |||
36 | 34 | | |
37 | 35 | | |
38 | 36 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 37 | + | |
43 | 38 | | |
44 | | - | |
45 | 39 | | |
46 | 40 | | |
47 | | - | |
48 | 41 | | |
49 | 42 | | |
50 | 43 | | |
51 | 44 | | |
52 | 45 | | |
53 | | - | |
54 | 46 | | |
55 | 47 | | |
56 | | - | |
57 | 48 | | |
58 | 49 | | |
59 | 50 | | |
60 | 51 | | |
61 | 52 | | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
| 53 | + | |
73 | 54 | | |
74 | 55 | | |
75 | 56 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
| |||
Lines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | 23 | | |
28 | 24 | | |
29 | 25 | | |
| |||
Lines changed: 0 additions & 28 deletions
This file was deleted.
0 commit comments