Unable to link react-native-vector-icons
See original GitHub issueIssue Description
I am following native-base docs https://docs.nativebase.io/Components.html#icon-def-headref but getting error Unrecognized font family ‘Ionicons’ for following code
Issue is of Icon
import React, { Component } from 'react';
import { Container, Header, Content, Icon } from 'native-base';
export default class IconExample extends Component {
render() {
return (
<Container>
<Header />
<Content>
<Icon name='home' />
<Icon ios='ios-menu' android="md-menu" style={{fontSize: 20, color: 'red'}}/>
<Icon type="FontAwesome" name="home" />
</Content>
</Container>
);
}
}
https://cloud.githubusercontent.com/assets/13981427/17029309/c48ee584-4f38-11e6-8e01-0df6f7dabc8f.png
node, npm, react-native, react and native-base version, expo version if used, xcode version
node => v12.16.3
npm => 6.14.4
native-base => "^2.13.12"
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (2 by maintainers)
Top Results From Across the Web
React native vector icon not working on current version 0.60
This worked for me on an upgraded project and on a brand new RN 0.60.0. For IOS add this to ios/projectname/Info.plist
Read more >react-native-vector-icons - npm
Customizable Icons for React Native with support for NavBar/TabBar, image source and full styling.. Latest version: 9.2.0, last published: 6 ...
Read more >React Native Vector Icons - iOS And Android Setup - YouTube
Title: React Native Vector Icons - iOS And Android SetupCode Big ... try restarting your device. Your browser can't play this video.
Read more >let's display icons to use react-native-vector-icons library.
To link react-native-vector-icons on iOS, execute ios/[project].xcworkspace to open Xcode. ... After executing Xcode, right-click the project and click New Group ...
Read more >Troubleshooting - React Native Elements
Although we try to make the experience of using React Native Elements. ... react-native link react-native-vector-icons ... "Unable to resolve module x".
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Finally got to the bottom of this, the issue was because of the font families not being available in the iOS project. Even though the libraries are auto-linked in React Native >= 0.60 the fonts are still missing and have to be manually added to the iOS project. Here’s how to do that
info.plist
file located in[project_root] > ios > [project_name] > info.plist
. It’s an XML type fileThis issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.