Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: Unrecognized font family Material Design icons after installing react-native-elements?

Tags:

react-native

I am a Newbie in react-native. I created a new project using react-native-cli. I am Using react-native-elements As A UI component library for React Native. So I ran following commands

**npm i react-native-elements --save**

After this i ran my simulator command,

react-native run-ios

not sure how to resolve this error.

like image 369
CuriousAboutThings Avatar asked Feb 03 '18 19:02

CuriousAboutThings


1 Answers

If you are coming from react-native 0.60+ so please add the UIAppFonts (below mention) in info.plist file . And drag and drop the fonts folder under node_modules/react-native-vector-icons to the project in xcode. Make sure your app is checked under "Add to targets" and that "Create groups" is checked if you add the whole folder.

<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>
like image 125
Zeeshan Ansari Avatar answered Sep 17 '22 14:09

Zeeshan Ansari