Closed
Description
I am new to React-Native, I have added react-native-vector-icons library manually to Xcode and Android studio. if run the code with Xcode its executing successfully without any issue. but if i trying to run the code from Terminal (react-native run-ios) its showing 'Unrecognized font family Material' in simulator. but the same this working if i runs the command (react-native run-android).
Please help me
Activity
oblador commentedon Mar 18, 2019
Hi, your build is failing and launching a previously compiled (out of date) binary. It seems that you've drag-and-dropped files to your project that has since been deleted from this project instead of importing the project itself. Try to link this library again using the instructions in the readme.
pachun commentedon Apr 22, 2019
@bhoomesh950 Make sure the font is linked and also make sure you're importing
Rather than
Which my editor's (vim) autocomplete (coc) suggested.
(It actually suggested both, but I got the same error as you before getting linking setup (rerun
react-native run-ios
).I hope I helped. If not, good luck!
SnehalAgrawal commentedon Aug 16, 2019
After installation you need to link the library (After the updation of React Native 0.60, they have introduced autolinking feature means we do not require to link the library but they have also mentioned that some libraries need linking and react-native-vector-icons is one of those cases).
After the linking just install the ios/pod file using pod install
You can follow Example to Use Vector Icons in React Native for the updated example of React Native 0.60
adjoaEdwin commentedon Oct 16, 2019
After installation and linking the library, you need to check
Run script only when installing under [CP] Copy Pods Resources in Xcode under yourprojectname.
ghost commentedon Oct 29, 2019
I had the same issue with
Xcode
:11.1
,react-native
:61.2
andreact-native-sectioned-multi-select
which depends onreact-native-vector-icons
These steps solved the issue on my machine.
yarn add react-native-vector-icons
install iconsyarn react-native link
manual linking despite autolink is enabledcd ios
,pod install
install fonts for iosopen <ios-project>.xcodeproj
checkmarkRun script only when installing
just like @adjoaEdwin described itcd ..
watchman watch-del-all
,rm -rf node_modules
,yarn install
,rm -rf /tmp/metro-*
clean-upyarn ios
run and confirm it's workingNote: I have no global installation of
react-native
andyarn
doesn't require having"react-native": "react-native"
inpackage.json
. that's whyyarn react-native link
just works. <3 yarnBatDroid commentedon Oct 30, 2019
for me was the face that the fonts were not defined in the info.plist
Seishin commentedon Oct 30, 2019
Encountered this issue today and spent an hour debugging it. My issue was resolved by checking the info.plist file and adding the fonts to the UIAppFonts array as they were missing in it:
lehmamic commentedon Oct 31, 2019
Thanks, this helped me.
janhesters commentedon Nov 5, 2019
@Seishin When I apply your fix, I can't start my app (try it with a fresh start aka. close simulator and terminal). I get the error described here:
https://react-native-elements.github.io/react-native-elements/docs/getting_started.html#step-2-install-react-native-vector-icons
And if I unlink the assets, the icons aren't found again.
AlexandreBonfim commentedon Nov 12, 2019
@Seishin I really appreciate your help.... worked smooth !!!!!
manoelneto commentedon Nov 20, 2019
@Seishin really helped me. Thanks!!!!
Jonathansoufer commentedon Nov 22, 2019
Thanks @fibric, your step-by-step worked perfectly!
YeshanJay commentedon Jan 22, 2020
Thank you @Seishin 😃
Fix running on ios by:
27 remaining items