Reanimated module is not initialized when a class that implements the RCTBridgeDelegate Protocol is used
See original GitHub issueDescription
Reanimated module is not initialized when a class that implements the RCTBridgeDelegate Protocol is used (e.g. when dependency injections are needed/brownfield apps). App throws undefined is not an object (evaluating 'InnerNativeModule.installCoreFunctions')
When a class that implements the RCTBridgeDelegate Protocol is used, jsExecutorFactoryForBridge in UIResponder+Reanimated.mm is never called.
My understanding is this happens because this condition
if ([self.delegate conformsToProtocol:@protocol(RCTCxxBridgeDelegate)]) {
in RCTCxxBridge.mm is not satisfied and [cxxDelegate jsExecutorFactoryForBridge:self] is not called here.
Expected behavior
Reanimated module is initialized.
Actual behavior & steps to reproduce
Module is not initialized and App crashes with undefined is not an object (evaluating 'InnerNativeModule.installCoreFunctions'). Please see link to the fork of reanimated 2 playground below to reporoduce
Snack or minimal code example
fork of reanimated 2 playground that demonstrates the issue (branch name delegate_bridge)
Package versions
- React Native: 0.65.1
- React Native Reanimated: 2.3.0-beta.1 (also tested on 2.3.1, 2.2.4)
- NodeJS: 14.18.0
- Xcode: 13.1
- Java & Gradle: not relevant
Affected platforms
- Android
- iOS
- Web
Issue Analytics
- State:
- Created 2 years ago
- Reactions:6
- Comments:8 (1 by maintainers)

Top Related StackOverflow Question
The module will autoinstall if the class that implements the RCTBridgeDelegate Protocol is a subclass of UIResponder. E.g. in the example fork above:
Alternatively, Reanimated can be patched with
patch-package:just created new repo (init with RN 0.69 + Reanimated 2.9.1) to repro this issue:
bridgeinitiated inAppDelegate–> Reanimated works finebridgeinitiated outside ofAppDelegate–> throwsTypeError: undefined is not an object (evaluating 'this.InnerNativeModule.installCoreFunctions')