Skip to content

Commit 55248b3

Browse files
zeyapmeta-codesync[bot]
authored andcommitted
Revert RCTAnimatedModuleProvider change from D94244698 (facebook#56100)
Summary: Pull Request resolved: facebook#56100 ## Changelog: [iOS] [Fixed] - Revert RCTAnimatedModuleProvider change from D94244698 D94244698 added a guard in RCTAnimatedModuleProvider that returns nullptr when useSharedAnimatedBackend() is true, expecting DefaultTurboModules to handle AnimatedModule creation instead. However, on iOS the TurboModule resolution chain in RCTReactNativeFactory delegates to the app-provided getTurboModule:jsInvoker: and returns whatever the delegate returns — even nullptr — without falling through to DefaultTurboModules. This causes `Invariant Violation: Native animated module is not available` on any surface using Animated.View (e.g. Marketplace PDP) when react_fabric.enable_shared_animated_backend_ios is enabled. Revert the RCTAnimatedModuleProvider change from D94244698 so it always provides AnimatedModule when cxxNativeAnimatedEnabled is true, regardless of useSharedAnimatedBackend. The shared backend path in DefaultTurboModules still exists as fallback for non-iOS platforms. Reviewed By: christophpurrer Differential Revision: D96611917 fbshipit-source-id: e01cf5c80dc4cbf30afac6bcf414616c15bfaddb
1 parent af0cccc commit 55248b3

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

packages/react-native/ReactApple/RCTAnimatedModuleProvider/RCTAnimatedModuleProvider.mm

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,7 @@ - (void)_onDisplayLinkTick
7070
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const std::string &)name
7171
jsInvoker:(std::shared_ptr<facebook::react::CallInvoker>)jsInvoker
7272
{
73-
if (facebook::react::ReactNativeFeatureFlags::cxxNativeAnimatedEnabled() &&
74-
// initialization is moved to DefaultTurboModules when using shared animated backend
75-
// TODO: T257053961 deprecate RCTAnimatedModuleProvider.
76-
!facebook::react::ReactNativeFeatureFlags::useSharedAnimatedBackend()) {
73+
if (facebook::react::ReactNativeFeatureFlags::cxxNativeAnimatedEnabled()) {
7774
if (name == facebook::react::AnimatedModule::kModuleName) {
7875
__weak RCTAnimatedModuleProvider *weakSelf = self;
7976
auto provider = std::make_shared<facebook::react::NativeAnimatedNodesManagerProvider>(

0 commit comments

Comments
 (0)