我目前正在开发一个带有react本机应用程序(版本0.55.2)和viro(版本12)的Ar应用程序。 我按照他们的教程在iOS和Android上安装了Viro。 (https://docs.viromedia.com/docs/integrating-with-react-native-projects)。 它在Android上运行良好,但在xcode上出现构建错误。 我按照以下步骤在ios(https://docs.viromedia.com/docs/no_use_frameworks)上安装了viro。 我的podfile如下所示
# Uncomment the next line to define a global platform for your project
platform :ios, '9.3'
target 'treasureHunters' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# Pods for project
pod 'ViroReact', :path => '../node_modules/react-viro/ios/'
pod 'ViroKit_static_lib', :path => '../node_modules/react-viro/ios/dist/ViroRenderer/static_lib'
end
我有Pod安装成功消息。吊舱锁看起来像这样
PODS:
- ViroKit_static_lib (1.0)
- ViroReact (1.0)
DEPENDENCIES:
- ViroKit_static_lib (from `../node_modules/react-viro/ios/dist/ViroRenderer/static_lib`)
- ViroReact (from `../node_modules/react-viro/ios/`)
EXTERNAL SOURCES:
ViroKit_static_lib:
:path: "../node_modules/react-viro/ios/dist/ViroRenderer/static_lib"
ViroReact:
:path: "../node_modules/react-viro/ios/"
SPEC CHECKSUMS:
ViroKit_static_lib: 17cb5bbb409057a98d2922cef37afb6b132dd630
ViroReact: 5520f26ac4654e361786c82da3b29ce0402c3c00
PODFILE CHECKSUM: 4df8dc354119fe43ff9c12440dce232d09df282d
COCOAPODS: 1.5.2
我打开了xcworkspace文件,将Enable Bitcode设置为no。当我构建项目时,链接器命令出错,退出代码为1,并显示以下消息:“找不到框架ViroKit_static_lib”。
我不确定该如何解决。有什么地方可以改变吗?
答案 0 :(得分:0)
在项目的“构建设置”中,将其添加到框架搜索路径:
"${PODS_ROOT}/../../node_modules/react-viro/ios/dist/ViroRenderer/static_lib"
将此添加到库搜索路径:
"${PODS_ROOT}/../../node_modules/react-viro/ios/dist/lib"