react native - IOS -- 踩坑篇

  • 错误❌ Unrecognized font family 'Material Icons'
    在使用react-native-vector-icons遇到的错误


    image.png
 版本:
 "react": "16.11.0",
 "react-native": "0.62.0",

✅ 解决办法✅
在info.plist插入一下代码
UIAppFonts

AntDesign.ttf
Entypo.ttf
EvilIcons.ttf
Feather.ttf
FontAwesome.ttf
FontAwesome5_Brands.ttf
FontAwesome5_Regular.ttf
FontAwesome5_Solid.ttf
Foundation.ttf
Ionicons.ttf
MaterialIcons.ttf
MaterialCommunityIcons.ttf
SimpleLineIcons.ttf
Octicons.ttf
Zocial.ttf

-错误 ❌ ios 添加证书提示:不能修改'System Roots'钥匙串


image.png

✅ 解决方案 ✅

选择“登录”或login按钮,直接将.cer/.p12文件拖进中间的各种钥匙列表中即可。
  • 问题❌ ios .cer无法导出.p12证书,.p12选项是灰色的

✅ 解决办法✅


image.png

再右击导出即可


image.png
  • 问题❌:
    Invalid Podfile file: syntax error, unexpected end-of-input, expecting end.
    image.png

    解决办法:
  • 问题❌:flatlist 引用出现:VirtualizedList: missing keys for items, make sure to specify a key or id property on each item or provide a custom keyExtractor.


    image.png

解决办法:
添加:

 _keyExtractor = (item, index) => item.id.toString();

引用


image.png
  • 问题❌:reactnative中iOS14 图片不显示解决办法
    解决办法:

    添加else

    转载:https://www.jianshu.com/p/97c89d566ae4

  • 问题❌ 执行 ‘pod --version’时报错, Could not find 'ffi' (>= 1.3.0) among 100 total gem(s) (Gem::MissingSpecError)

image.png

解决办法:

brew reinstall cocoapods

brew link --overwrite cocoapods

pod --version

成功


image.png

你可能感兴趣的:(react native - IOS -- 踩坑篇)