Unrecognized font family ionicons

后端 未结 9 1061
礼貌的吻别
礼貌的吻别 2021-02-04 02:19

I followed the setup instructions in the NativeBase Docs and ran rnpm link. I am getting this error: Unrecognized font family ionicons

also checked by Xco

9条回答
  •  孤街浪徒
    2021-02-04 02:24

    For RN 0.60+ don't use react-native link ...! (see Autolinking)

    Instead add this in your Podfile:

    pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
    

    and run pod update (or pod install).

    Furthermore add this in your 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
    
    

    (took from https://github.com/oblador/react-native-vector-icons#option-with-cocoapods)

    Works fine in my project with:

    "react": "16.9.0",
    "react-native": "0.61.1",
    "native-base": "2.13.8" (react-native-vector-icons@6.6.0),
    

提交回复
热议问题