react-native-vector-icons: Icons not showing on IOS app
Environment
Target platform: IOS
"react": "16.13.1",
"react-native": "0.63.4",
"react-native-vector-icons": "^8.1.0",
Description
Icons are not shown on the TestFlight mode on the Apple store even though they are working fine in Expo and Xcode simulator. I have followed everything in the list here https://github.com/oblador/react-native-vector-icons#ios as well as creating a new group and adding all *.ttf files to the new group that is called Fonts. Is there anything else that I am missing out?
Code
import Icon from "react-native-vector-icons/MaterialIcons";
...
<Icon name="save" size={20} />
...
Demo
Xcode project

App on the Apple store TestFlight

Expo

About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 2
- Comments: 48
add code to
ios/AppName/Info.plistUsing Flutter @ronaldborla
I was able to solve this issue by adding the actual font files from the Fonts folder under the Copy Bundle Resources tab (inside [App Name].xcworkspace), whereas before, I just had the “Fonts” folder there with the font files inside.
Hope this helps someone because I spent hours trying everything mentioned above to no avail 😭
@laogui
They are already in the file.
Works for me!
@laogui For me Copy pasting worked. I pasted this on the top Killed the app.
And then again
Add this line in your PodFile
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'then run
cd ios && pod installWorks for me!
it works for me
pod installworked for me 👍STEPS
cd ios && pod installI’m using expo and I finally solved this issue by upgrading the version to Expo 41, so it upgraded a lot of dependencies. But some significant change for iOS are:
platform :ios, '10.0'toplatform :ios, '11.0')gem install cocoapods(or usesudo)cd iosthenpod installThe icons appeared correctly now for me on production build
The podfile is
After upgrading to react-native 0.73, I faced this issue but only Ionicons bundle set not showing, other bundle set is still working fine.
I follow all steps from official document but still show question mark on ios, while on android it’s ok. This comment help me resolve. Thanks so much.
Worked for me. Thanks!
ONE BIG SOLUTION FOR THIS IS WORKED FOR ME. Guys use following insturction You can also try building app using xcode? may be this will work because all pods files are visible to the xcode as follows…
Step 1: add this lines to pod file <array> <string>AntDesign.ttf</string> <string>Entypo.ttf</string> <string>EvilIcons.ttf</string> <string>Feather.ttf</string> <string>FontAwesome.ttf</string> <string>FontAwesome5_Brands.ttf</string> <string>FontAwesome5_Regular.ttf</string> <string>FontAwesome5_Solid.ttf</string> <string>Fontisto.ttf</string> <string>Foundation.ttf</string> <string>Ionicons.ttf</string> <string>MaterialCommunityIcons.ttf</string> <string>MaterialIcons.ttf</string> <string>Octicons.ttf</string> <string>SimpleLineIcons.ttf</string> <string>Zocial.ttf</string> </array>
Step 2 : Now just open your project ios file using XCode check your ‘RNVectorIcons’ this pod is avaliable there & build manually as normal build you can see all this icons are visible now!
THANK ME LATER 😉
Thanks @minhle10, it worked for me.
The current
ReadmesaysBrowse to node_modules/react-native-vector-icons and drag the folder Fonts (or just the ones you want) to your project in Xcode, but to be able to add the fonts under Copy Bundle Resources tab I had first to create the Fonts folder, following this, and after that dragging the fonts in.