问题描述
当我尝试使用Xcode 12 Beta 4构建项目以测试iOS14时,我得到了很多Undefined symbols for architecture x86_64
。每次我构建应用程序时,错误列表都会更改。原生库无法识别基本的React类。
我在React-Native仓库中打开了一个问题:https://github.com/facebook/react-native/issues/29633
出现错误的示例项目:https://github.com/igoriols/xcode12reactnativesample
解决方法
嘿,请在这里检查:https://github.com/facebook/react-native/issues/29633#issuecomment-694187116
podspec需要更新。
,从this issue的回应之一中,我添加了以下安装脚本:
find ./node_modules -type f -name '*.podspec' | xargs sed -i.sed -e "s%'%\"%g"
find ./node_modules -type f -name '*.podspec' | xargs sed -i.sed -e 's%s.dependency[\t ]*"React"%s.dependency "React-Core"%g'
一切都完美构建。