Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unrecognised font family ‘Ionicons’ error - Native Base

I am trying to use native base icons in my app but every time i am getting Unrecognized font family ‘Ionicons’ error. I searched it on google and tried everything. like rm -rf node_modules && npm install react-native link react-native-vector-icons react-native start --reset-cache

can anybody tell me some basic setups like where should I create my resource folder and all for this fix? Thanks

enter image description here

like image 782
Pankaj Agrawal Avatar asked Dec 09 '25 10:12

Pankaj Agrawal


2 Answers

I think you have to create folder call "Resources" in your Xcode project and place Ionicons.ttf file inside that folder. Try setup iOS Manually here (https://github.com/oblador/react-native-vector-icons)

  • Browse to node_modules/react-native-vector-icons and drag the folder Fonts (or just the ones you want) to your 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.
  • Edit Info.plist and add a property called Fonts provided by application.enter image description here
like image 190
Dinith Minura Avatar answered Dec 10 '25 23:12

Dinith Minura


for anyone facing similar issue while using the following combination

"native-base": "^2.8.1", "react": "16.6.1", "react-native": "0.57.7", "react-native-gesture-handler": "^1.0.10", "react-native-vector-icons": "^6.1.0", "react-navigation": "^3.0.8",

first clean the node_modules folder, then reinstall and also link

rm -rf node_modules
npm i
react-native link

then from xcode clean and then build for the ios project and run it in the simulator from xcode itself.

like image 43
Rishabh Avatar answered Dec 10 '25 22:12

Rishabh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!