Unrecognized font family 'Ionicons'
Here I have a simple component:
import React, { Component } from 'react';
import {
Container,
Header,
Title,
Content,
Button,
Icon,
} from 'native-base';
export default class App extends Component {
render() {
return(
<Container>
<Header>
<Button transparent>
<Icon name="ios-arrow-back" />
</Button>
<Title>Header</Title>
<Button transparent>
<Icon name="ios-menu" />
</Button>
</Header>
<Content>
</Content>
</Container>
);
}
}
I ran rnpm link like I was told to do in the Getting Started section of the docs. I am getting this error:

Any suggestions? Should I try to link native-base manually following the instructions in the docs?
Same problems... also checked xcode. The fonts are already in the build phase
You have restart packager after adding fonts. Close the packager terminal and restart from xcode. Should fix your problem.
Try rnpm link react-native-vector-icons
Try running rm -rf node_modules && npm install
If RN < 0.29, run rnpm link react-native-vector-icons
If RN >= 0.29, run react-native link react-native-vector-icons
Same problem here even after following the above suggestions.
Update:
I was able to resolve the issue by editing the info.plist, adding the font files, then running the application with Xcode. Docs here: https://github.com/oblador/react-native-vector-icons
I solved and I think this is one of cause.
http://image.prntscr.com/image/837ddc4fea2d427e8466671c2515b3b1.png
I tried to re-run this command react-native link react-native-vector-icons because my RN >= 0.29.
react-native link react-native-vector-icons solved my problem.
Only declaring in Info.plist helped http://stackoverflow.com/a/30540901
Hi All, I was having same problem and resolved by doing this.
- close running packager
- run react-native link react-native-vector-icons
- and run react-native start --reset-cache
- Finally use react-native run-ios
@sravindravmd thank you so much.
@charlieroth You can try to recreate the iOS Scheme on XCode, and run react-native link or rnpm link after.
What worked for me was uninstalling the @expo/vector-icons package recommended by Native-base Getting Started guide, and installing the react-native-vector-icons as a dependency.
npm install react-native-vector-icons --save
react-native link react-native-vector-icons
react-native link react-native-vector-icons is working for me thanks.
Hi, I am getting this same issue. So for some reason, my app is working perfectly fine when I run it through the emulator. But when I run it on my device, the same error is shown. I have no clue why it works on the emulator but not on the device.
@AbhayVarshney If you are using expo/CRNA then you need to import then Ionicons . somewhat like
async componentWillMount() {
await Expo.Font.loadAsync({
'Roboto': require('native-base/Fonts/Roboto.ttf'),
'Roboto_medium': require('native-base/Fonts/Roboto_medium.ttf'),
'Ionicons': require('native-base/Fonts/Ionicons.ttf'),
});
}
you can have a look here this will work for you .
@GeekRishabh I haven't used expo for my project. Is there another method w/o expo?
I had the same issue.
Solved by running first Link
react-native link
Then restart,
react-native run-ios
I specifically want to use Entypo from react-native-vector-icons. I have copied over the Fonts folder to the Xcode, checked all the icon types are there in info.plist and copy bundle resources, rm -rf node_modules && npm install, clean up last build, react-native link react-native-vector-icons and then npm start but it still does not work.
import Entypo from 'react-native-vector-icons/Entypo';
<Entypo name={icon} size={25}/>
and nothing shows up (Iconwise..) :(
I faced the issue with both v2.1.4 and v2.1.5
So I fixed the version in package.json to "native-base": "2.1.3"
Then ran the following:
rm -rf node_modules
npm i
react-native link