我按照NativeBase Docs中的设置说明操作并运行rnpm link
。我收到这个错误:Unrecognized font family ionicons
也由Xcode检查,字体已经处于构建阶段。我错过了什么?
扩展现有答案并使用this github issue上的解决方案,执行以下操作:
react-native link react-native-vector-icons
react-native start --reset-cache
react-native run-ios
重启模拟器如果你启动你的打包器,然后通过rnpm link
链接包,就会发生这种情况。
这需要您重新启动打包程序并重试。
我在mac.solution上遇到了同样的问题:
如果您的iOS项目使用CocoaPods(包含Podfile)并且链接库具有podspec文件,则react-native链接将使用Podfile链接库。
将下面的评论添加到podfile的底部。
# Add new pods below this line
然后运行“react-native link [package_name]”
这适合我。