npm install --save react-native-vector-icons
ios
Copy the contents of the node_modules/react-native-vector-icons/Fonts folder to the ios/Fonts folder of the project
Select the content in Ios/Fonts/
Click on the Ifon.plist file and add an item "Fonts provided by application" on the right
Click the Add button in Fonts provided by application to add content and fill in the ttf file name as follows
<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> <string>Fontisto.ttf</string> </array>
Create a new react-native.config.js file in the root directory, add the following content
android
Recommended way of writing Add content to the
fileandroid/app/build.gradle
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"