为 ios 启用 Hermes 引擎:在 Mac M1 上 React Native

Moh*_*oel 5 performance ios react-native react-native-hermes apple-m1

在 podfile 中启用 Hermes 引擎后,在构建应用程序时会抛出错误

"Undefined symbols for architecture x86_64: "vtable for facebook::react::HermesExecutorFactory"

爱马仕版本:0.9.0

RN:0.66.1

pod 文件

 platform :ios, '11.0'
 target 'OneSignalNotificationServiceExtension' do
 pod 'react-native-onesignal', :path => '../node_modules/react-native-onesignal'
end

target '****' do
# Pods for ****
config = use_native_modules!
use_react_native!(path: config['reactNativePath'])

use_react_native!(
:path => config[:reactNativePath],
# to enable hermes on iOS, change `false` to `true` and then install pods
:hermes_enabled => true
Run Code Online (Sandbox Code Playgroud)

错误 在此输入图像描述

Moh*_*ili 2

你用的是复活吗?我遇到了同样的问题,更新 3.0.0-rc.5 为我解决了这个问题。

此外,这里还发布了 Hermes-engine (0.7.2) 的补丁

您可以检查此以获取更多信息:线程