Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unrecognized font family ionicons

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 Xcode, the fonts are already in the build phase. What am I missing?

like image 401
Supriya Kalghatgi Avatar asked Aug 02 '16 06:08

Supriya Kalghatgi


1 Answers

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:

<key>UIAppFonts</key> <array>   <string>AntDesign.ttf</string>   <string>Entypo.ttf</string>   <string>EvilIcons.ttf</string>   <string>Feather.ttf</string>   <string>FontAwesome.ttf</string>   <string>FontAwesome5_Brands.ttf</string>   <string>FontAwesome5_Regular.ttf</string>   <string>FontAwesome5_Solid.ttf</string>   <string>Foundation.ttf</string>   <string>Ionicons.ttf</string>   <string>MaterialIcons.ttf</string>   <string>MaterialCommunityIcons.ttf</string>   <string>SimpleLineIcons.ttf</string>   <string>Octicons.ttf</string>   <string>Zocial.ttf</string> </array> 

(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" ([email protected]), 
like image 75
Eddy Avatar answered Oct 10 '22 02:10

Eddy