[英]Symbol(s) not found for architecture x86_64 in Xcode 13
目前,我正在将 firebase 云消息服务集成到 react 本机移动应用程序中。 我按照他们关于 firebase 集成的文档进行了操作,并编辑了 pod 文件以使用框架。
使用框架时。 我收到关于传递依赖的错误。 这就是为什么我必须添加pre install do
和$static_framework
。
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
platform :ios, '11.0'
$RNFirebaseAsStaticFramework = true
target 'P2PMobileApp' do
use_frameworks!
$static_framework = ['FlipperKit', 'Flipper', 'Flipper-Folly', 'CocoaAsyncSocket', 'ComponentKit', 'DoubleConversion', 'glog', 'Flipper-PeerTalk', 'Flipper-RSocket', 'Yoga', 'YogaKit', 'CocoaLibEvent', 'OpenSSL-Universal', 'boost-for-react-native']
pre_install do |installer|
Pod::Installer::Xcode::TargetValidator.send(:define_method,:verify_no_static_framework_transitive_dependencies) {}
installer.pod_targets.each do |pod|
if $static_framework.include?(pod.name)
def pod.build_type;
Pod::BuildType.static_library
end
end
end
end
config = use_native_modules!
use_react_native!(
:path => config[:reactNativePath],
# to enable hermes on iOS, change `false` to `true` and then install pods
:hermes_enabled => false
)
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
target 'P2PMobileAppTests' do
inherit! :complete
# Pods for testing
end
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
# use_flipper!()
post_install do |installer|
react_native_post_install(installer)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
end
end
现在,当我尝试使用react-native run-ios
运行应用程序时出现以下错误
Undefined symbols for architecture x84_64:
"google::LogMessage::LogMessage(char const*, int, int)", referenced from:
__react_native_log_default in react_native_log.o
"google::LogMessageFatal::LogMessageFatal()", referenced from:
__react_native_log_default in react_native_log.o
...
注意:我已经使用arch -x86_64 pod install
完成了我的 pod 安装,因为我正在使用带有 M1 芯片的 mac mini。
我尝试使用以下解决方案解决该问题。 但他们都没有成功
$static_framwork
变量中删除glog (然后Undefined symbols for architecture x84_64:
双转换模块出现问题)我仍然坚持构建失败。 对此的任何帮助将不胜感激。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.