react-native-reanimated: iOS - 'NativeReanimated' could not be found.

Description

When running iOS I get the following error:

Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'NativeReanimated' could not be found. Verify that a module by this name is registered in the native binary.

I’ve followed the instructions on the website. Android works fine, this is just an issue with iOS.

I’ve attempted to wipe all the cache, pods, clean install, etc. Nothing seems to solve the problem.

Steps To Reproduce

Here is an example project: https://github.com/BrendonSled/react-native-reanimated-example

Expected Behavior

Runs

Actual Behavior

Doesn’t run

Snack or minimal code example

https://github.com/BrendonSled/react-native-reanimated-example

Package versions

  • React: 17.0.1
  • React Native: 0.63.4
  • React Native Reanimated: 2.0.0
  • NodeJS: 14.15.5

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 2
  • Comments: 16

Most upvoted comments

I finally got it.

In the AppDelegate.m I was using initWithBundleURL which does not seem to be supported. Instead using initWithBridge works.

here is my change:

  RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
  RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
                                                   moduleName:@"main"
                                            initialProperties:nil];

This was a missed step when upgrading from RN 0.58 -> 0.59

Screen Shot 2021-03-08 at 12 17 02 PM