Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unrecognized font family Material Icons?

Iam new to React-Native, I have added react-native-vector-icons library manually to Xcode and Android studio. if run the code with Xcode its executing successfully without any issue. but if i trying to run the code from Terminal (react-native run-ios) its showing 'Unrecognized font family Material' in simulator. but the same this working if i runs the command (react-native run-android).

please help me. this is the error showing in terminal Error Screen shot

** BUILD FAILED **


The following build commands failed:

    CompileC /Users/user/Documents/Test/JobsNProfiles/ios/build/Build/Intermediates.noindex/RNVectorIcons.build/Debug-iphonesimulator/RNVectorIcons.build/Objects-normal/x86_64/RCTFont+FA5.o /Users/user/Documents/Test/JobsNProfiles/node_modules/react-native-vector-icons/RNVectorIconsManager/RCTFont+FA5.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
like image 360
Nitya_Bhoomesh Avatar asked Mar 14 '19 09:03

Nitya_Bhoomesh


2 Answers

The solution I found is to check if the fonts are added to the UIAppFonts array in the Info.plist file:

<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>

For more information here

like image 157
Seishin Avatar answered Nov 08 '22 11:11

Seishin


I am not sure what exactly you are missing in your configuration, so I am gonna state all what I believe is the case:

  1. Delete ios/build folder, then try automatic linking: react-native link react-native-vector-icons.

  2. Make sure you have checked that the font is copied in the Copy Bundle Resources in Build Phases. If not, re-check the manual configuration steps.

  3. Make sure you kill the packager and re-run for changes to take effect.

like image 5
Bader Serhan Avatar answered Nov 08 '22 11:11

Bader Serhan