The solution for react-native ios unrecognized font family "iconfont"

Debugging on the IOS real machine shows the red screen problem of unrecognized font family "iconfont", check the react-native-vector-icons module, you can see that it has been installed,
write picture description here
if it is not installed, npm install react-native-vector-icons –save can be installed , Install react-native link react-native-vector-icons at the end of the installation.
Open the project where Xcode is located, and
write picture description here
add . The structure is as follows:
write picture description here
Open the info.plist list file and add a line of Fonts provided by application in the format of an array. To add font files to the items of the array,
write picture description here
execute
react-native link react-native-vector-icons
react-native start –reset-cache
react-native run-ios to view the results.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324677726&siteId=291194637