Skip to content

Delete legacy RCTNativeAnimatedModule from RN iOS - #57904

Open
christophpurrer wants to merge 1 commit into
react:mainfrom
christophpurrer:export-D115663619
Open

Delete legacy RCTNativeAnimatedModule from RN iOS#57904
christophpurrer wants to merge 1 commit into
react:mainfrom
christophpurrer:export-D115663619

Conversation

@christophpurrer

Copy link
Copy Markdown
Contributor

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: D115663619

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: D115663619
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 12, 2026
@meta-codesync

meta-codesync Bot commented Aug 12, 2026

Copy link
Copy Markdown

@christophpurrer has exported this pull request. If you are a Meta employee, you can view the originating Diff in D115663619.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant