react-native: Library not loaded: @rpath/hermes.framework/hermes on iOS

Description

As soon as the app starts, it crashes.

Version

0.70.0

Output of npx react-native info

System:
    OS: macOS 12.5.1
    CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
    Memory: 299.79 MB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 8.11.0 - ~/.nvm/versions/node/v16.16.0/bin/npm
    Watchman: 2022.02.14.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
    Android SDK: Not Found
  IDEs:
    Android Studio: 4.1 AI-201.8743.12.41.6953283
    Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.16 - /Library/Java/JavaVirtualMachines/jdk-11.0.16.jdk/Contents/Home/bin/javac
  npmPackages:
    @react-native-community/cli: 8.0.4 => 8.0.4 
    react: 18.2.0 => 18.2.0 
    react-native: 0.70.0 => 0.70.0 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce

Just launch npx react-native run-ios --simulator "iPhone 12" with hermes_enabled => true

Snack, code example, screenshot, or link to a repository

none

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 6
  • Comments: 20

Commits related to this issue

Most upvoted comments

I solved it by adding hermes.xcframework file to xcode > build phases > Link binary with Libraries just press to + sign and search for hermes Screenshot 2022-09-07 at 7 03 52 PM Add it and rebuild your app.

This works for builds with xcode, but not for cmd-builds like react-native uses: npx react-native run-ios any fix for this?

Screenshot 2022-09-12 at 10 54 00 AM

Yes in xCode you will need to Embed & Sign hermes framework and then build again using command. It will work.

I solved it by adding hermes.xcframework file to

xcode > build phases > Link binary with Libraries

just press to + sign and search for hermes

Screenshot 2022-09-07 at 7 03 52 PM

Add it and rebuild your app.

working if i disable hermes on Podfile

Thanks but i would like to keep it enabled!

I solved it by adding hermes.xcframework file to

xcode > build phases > Link binary with Libraries

just press to + sign and search for hermes

Screenshot 2022-09-07 at 7 03 52 PM

Add it and rebuild your app.

This works for builds with xcode, but not for cmd-builds like react-native uses: npx react-native run-ios any fix for this?

working if i disable hermes on Podfile

@allemanfredi could you help me understand why that is needed/what it does? 🤔

@niyati-tanna-tark I solved by doing this.